IE Keeps Centering My Table Content |
IE Keeps Centering My Table Content |
jjs6067 |
Jun 18 2010, 05:41 PM
Post
#1
|
Group: Members Posts: 7 Joined: 18-June 10 Member No.: 12,128 |
Hey guys,
I'm making a site for my mom's company, www.citizenscontracting.com, and for some reason in internet explorer, the text inside of the tables are centered. However, in firefox and safari, it is aligned left like it's supposed to be. I tried text-align and it did not work. Any suggestions for making it left aligned in IE? |
Darin McGrew |
Jun 18 2010, 05:46 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Don't use align="center" to center block-level elements. See
http://dorward.me.uk/www/centre/ http://www.w3.org/Style/Examples/007/center.html |
jjs6067 |
Jun 18 2010, 05:56 PM
Post
#3
|
Group: Members Posts: 7 Joined: 18-June 10 Member No.: 12,128 |
Don't use align="center" to center block-level elements. See http://dorward.me.uk/www/centre/ http://www.w3.org/Style/Examples/007/center.html No, you see, the problem is that the text IS centered. I want the text to be left aligned. For some reason, IE centers my text when i don't want it to. |
pandy |
Jun 18 2010, 06:46 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Yes, because in some browsers the alignment is inherited inside contained block level elements and make the text centered. So don't use align="center".
|
Darin McGrew |
Jun 18 2010, 06:50 PM
Post
#5
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
You have the layout centered in the page. You are using align="center" to do that. However, align="center" is supposed to center text and other inline content, not block-level elements like the DIVs and TABLEs that you use to create your layout. Apparently, MSIE picks up the align="center" and centers your text.
If you get rid of the align="center" and use CSS to center your DIVs and TABLEs (as described in the links I provided), then MSIE shouldn't center your text. |
jjs6067 |
Jun 20 2010, 09:18 PM
Post
#6
|
Group: Members Posts: 7 Joined: 18-June 10 Member No.: 12,128 |
You have the layout centered in the page. You are using align="center" to do that. However, align="center" is supposed to center text and other inline content, not block-level elements like the DIVs and TABLEs that you use to create your layout. Apparently, MSIE picks up the align="center" and centers your text. If you get rid of the align="center" and use CSS to center your DIVs and TABLEs (as described in the links I provided), then MSIE shouldn't center your text. Worked like a charm! Thanks for your help! |
Lo-Fi Version | Time is now: 26th April 2024 - 06:08 AM |