Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-01-2012, 06:06 AM   PM User | #1
markhatter
New to the CF scene

 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
markhatter is an unknown quantity at this point
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
markhatter is offline   Reply With Quote
Old 08-01-2012, 10:42 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,037
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 08-01-2012, 06:20 PM   PM User | #3
TylerB
New Coder

 
Join Date: Aug 2012
Location: Kalamazoo, MI
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
TylerB is an unknown quantity at this point
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.
TylerB is offline   Reply With Quote
Old 08-01-2012, 09:37 PM   PM User | #4
tempz
Regular Coder

 
Join Date: Jul 2012
Location: London
Posts: 436
Thanks: 4
Thanked 80 Times in 80 Posts
tempz is an unknown quantity at this point
Quote:
Originally Posted by TylerB View Post
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
tempz is offline   Reply With Quote
Reply

Bookmarks

Tags
align, center, css, div, html

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:50 AM.


Advertisement
Log in to turn off these ads.