Hi, i have recently created a website and i have noticed the site is not centeredhow can i center the site for all screens? is there any code?
Hi, i have recently created a website and i have noticed the site is not centeredhow can i center the site for all screens? is there any code?
Enclose the whole site within <center></center> tags.
I have used this before, but never with a whole site!
i guess there are a few options according to what you are trying to accomplish.
you may need to put everything in a centered div. if you are not familiar with divs, you should read up on them.
the following link shows another way:
http://bluerobot.com/web/css/center1.html
link to your page and someone may can help further or more specifically.
What are you trying to accomplish? A centered div will center everything but it will also center text and images which could change the way your site looks. Are you trying to get the content in the middle of the screen with margins on either side? YOu may be needing to set parameters in a table or CSS code for that
Hello,
Use CSS properties to center your pages, it would be better
~Nabil
"It's choice not chance that determines your destiny."
i want it so when someone goes on the website, no matter what size screen they have, the site is always centered.
I hope that explains it better
i would say do this <center><body>hsdlgjkhjdshglkdh(what ever the body is)</body></center> hope it helped ya
Last edited by BorderLineSigs; 03-26-2008 at 03:02 PM.
Nice Site HereGreat site to vistit: http://gamez.exofire.netgive rep+ if my post helped AT ALL or you will pay...LATE FEES:bash:
do
<div align="center"> content </div>
I am not sure if it is "correct" html but it works and it is what dreamweaver automatically does if you use its centering button.
edit: is there a link to what you want centered? so we can help you better?
Last edited by Jake; 03-26-2008 at 08:49 PM.
█ Jake Omann | Developer
█ 888-X10-9668 - jake[@]x10hosting.com
█ x10Hosting - Giving Away Hosting Since 2004
█ Premium Hosting | VPS Services
Here is another example that uses css, and only centres a div not all the contents as well, examples of this include this forum itself, it centres the div with a background around it, but not the contents. It uses the margin css properties.
HTML Code:<head> <style type="text/css"> .maindiv { margin-top: 0px; margin-right: auto; margin-left: auto; } </style> </head> <body> <div class="maindiv" style="width: 85%;"> Here is the Uncentered Content within a centered div. </div> </body>
~LHVWB, Formerly known as Verbsite.
Getting Started | Forum Rules | X10 Commandments
Terms of Service | Getting Support | IRC Support Chat
Using Simple Machines Forums? Check out my SMF Mods..
u could also use
margin: 0px auto;
█ Jake Omann | Developer
█ 888-X10-9668 - jake[@]x10hosting.com
█ x10Hosting - Giving Away Hosting Since 2004
█ Premium Hosting | VPS Services