SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
-
Aug 25, 2004, 11:28 #1
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
site is aligned left...should be center
here is the address....
www.geocities.com/deronsizemore/index5.htm
I don't know why. It does it in IE 5.5. All above that it seems to be fine.
Thanks,
Deron
-
Aug 25, 2004, 11:33 #2
- Join Date
- Sep 2002
- Location
- Canada
- Posts
- 2,087
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
In the body tag put text-align: center; and in #container put text-align: left;
That should fix it."A nerd who gets contacts
and a trendy hair cut is still a nerd"
- Stephen Colbert on Apple Users
-
Aug 25, 2004, 12:08 #3
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
why text-align: left; in the body tag?
-
Aug 25, 2004, 12:23 #4
- Join Date
- Sep 2002
- Location
- Canada
- Posts
- 2,087
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
No, text-align: center; in the body tag.
"A nerd who gets contacts
and a trendy hair cut is still a nerd"
- Stephen Colbert on Apple Users
-
Aug 25, 2004, 13:39 #5
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
my bad...I meant #container
-
Aug 25, 2004, 13:57 #6
- Join Date
- Sep 2002
- Location
- Canada
- Posts
- 2,087
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
otherwise everything contained in #container will be text-align: center;
"A nerd who gets contacts
and a trendy hair cut is still a nerd"
- Stephen Colbert on Apple Users
-
Aug 25, 2004, 13:58 #7
- Join Date
- Aug 2004
- Location
- georgetown, tx
- Posts
- 86
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just to clarify, the
HTML Code:text-align: left;
Edit: oops, The New Guy beat me...
-
Aug 25, 2004, 15:04 #8
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Deron have a look at the FAQ sticky thread on centering if you are still unsure
IE 5 and 5.5. (and ie6 in quirks mode) cdon't understand margin-left:auto and margin-right:auto and don't realise that is should centre block level elements that have a specified width.
Instead they wrongly assume that text-align:center not only centres text but nested block level elements as well. Which is why you need text-align:center on a parent such as the body in order to centre the element nested within.
Of course you then need to set the text back to text-align:left for the nested element otherwise the text will be centred as well.
Paul
Bookmarks