...

View Full Version : Center align entire webpage



markhatter
08-01-2012, 07:06 AM
Hi

For some reason, my website won't align in the center on all browsers. Seems to be an issue is IE and also on IOS browsers
http://poppyandpaige.com/blog/
Any ideas would be most appreciated!

Thanks
Mark

Philip M
08-01-2012, 11:42 AM
Seems OK in IE9. Try

* { text-align:center;}


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

TylerB
08-01-2012, 07:20 PM
Yeah it looks good to me in Firefox, Chrome, and IE9. However if you are trying to center align the text, Philip's answer above me will do just fine. Add that to the body selector in your CSS. If you are trying to center align your content box, add this to your content box css:



margin: 0 auto;


that will auto align your left and right sides, centering your content to the middle. The 0 in front of "auto" is for the top and bottom margins, you can change this if you would like.

tempz
08-01-2012, 10:37 PM
Yeah it looks good to me in Firefox, Chrome, and IE9. However if you are trying to center align the text, Philip's answer above me will do just fine. Add that to the body selector in your CSS. If you are trying to center align your content box, add this to your content box css:



margin: 0 auto;


that will auto align your left and right sides, centering your content to the middle. The 0 in front of "auto" is for the top and bottom margins, you can change this if you would like.


margin:0 auto;

Won't work unless his got a width above 800 :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum