The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> IE Keeps Centering My Table Content
jjs6067
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jjs6067
post Jun 18 2010, 05:56 PM
Post #3





Group: Members
Posts: 7
Joined: 18-June 10
Member No.: 12,128



QUOTE(Darin McGrew @ Jun 18 2010, 06:46 PM) *

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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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". wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jjs6067
post Jun 20 2010, 09:18 PM
Post #6





Group: Members
Posts: 7
Joined: 18-June 10
Member No.: 12,128



QUOTE(Darin McGrew @ Jun 18 2010, 07:50 PM) *

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!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 06:08 AM