oceans Posted May 10, 2007 Share Posted May 10, 2007 Friends, I have made a page with small width so that a smaller screen can show the whole contant, now the issue is the page get left oriented if I view in larger screen. How can I get it to be center screened. thanks. Link to comment https://forums.phpfreaks.com/topic/50774-centering-a-page/ Share on other sites More sharing options...
ToonMariner Posted May 10, 2007 Share Posted May 10, 2007 if you have set the width of an element (and its parents) then use margin: 0 auto; in you css. so eg.. html { width: 100%; } body { width: 240px; margin: 0 auto; } Link to comment https://forums.phpfreaks.com/topic/50774-centering-a-page/#findComment-249687 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.