CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Center align entire webpage (http://www.codingforums.com/showthread.php?t=269252)

markhatter 08-01-2012 06:06 AM

Center align entire webpage
 
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 10: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 06: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:

Code:

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 09:37 PM

Quote:

Originally Posted by TylerB (Post 1256725)
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:

Code:

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.

Code:

margin:0 auto;
Won't work unless his got a width above 800 :thumbsup:


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.