Hi,
I am trying to center a web page when viewed on a wide screen.
This is hard for me to check as i do not have a wide screen yet.
I'm building the web pages with HTML and CSS.
Any help would be much appreciated....
Thank you :>
| SitePoint Sponsor |
Hi,
I am trying to center a web page when viewed on a wide screen.
This is hard for me to check as i do not have a wide screen yet.
I'm building the web pages with HTML and CSS.
Any help would be much appreciated....
Thank you :>
You can put your entire site in div tags and using css set:
*a width
*margin-left to auto
*margin-right to auto
That will center the page
Last edited by SublimeSite; Nov 3, 2009 at 21:20. Reason: typo
Yeah if you put your entire site in a div with an id of "wrapper", your css would look like:
#wrapper{
margin:0 auto;
width:900px;
}
You can change the width but you get the point.
Thanks for your reply.
Would that be the same if I was just using HTML?
if your not using an external style sheet use...
<div style="margin:0 auto;"> </div>

Cheers![]()
I have a hard time doing this, I was fooled that doing this one needs to have an text-align: center; on your stylesheet.




Alex Stanford @alexstanford tumblog about.me in fb G+ K
TechTalkin The Premier Community for Technology Enthusiasts and Professionals
Full Ambit Media Zero Sacrifice Web Design & Development; Made in the USA @fullambit in fb G+ K
Thanks
Bookmarks