NameSilo

How do you create a centered webpage design?

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Rhino1616

Established Member
Impact
0
Good day,

Im thinking of designing a site in a fixed format, (when viewed on 800x600 it will take up the whole page & when viewed on 1024x768 it will be centered on the page) such as the example below:

http://www.1-fitness-equipment.com[b/]

I know how to set up a page to be left aligned for various resolutions such as the example below:

http://www.costco.com

,but i would like to have it centered. could someone explain or point me to a tutorial that will explain how to do this.

Thank you
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
basicly enclose the whole site in this

HTML:
<div align="center">


</div>
 
0
•••
Or just after the body tag put <center>.
 
0
•••
Shorty said:
Or just after the body tag put <center>.
And then don't forget to put </center> tag before </body> tag in the end of html file :)
 
0
•••
css can achevie this effect too
 
0
•••
If you are using css then click here for a good link. You have to tweak some of the coordinates but it automatically centers it no matter what the resolution. I use it on my sites and it is awesome. You can see an example of it in action here!

Hope This Helps,
 
0
•••
</center> isn't neccessary actually, unless perhaps to pointlessly "validate" your script.
 
0
•••
That site I gave bluerobot has two different methods. I really like the second one because it is smooth and easy to use, even for the most new user to css.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back