Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE7 text-align not working

I have a simple horizontal UL LI main nav which I am trying to align to the center of the page. Text-align, which works in the other browsers is working but this does not work in IE7.

Is there something I am missing about this bug in IE7?

Thanks!

like image 476
Sixfoot Studio Avatar asked Aug 02 '10 12:08

Sixfoot Studio


People also ask

Is text-align deprecated?

This tag has been deprecated in HTML 4 (and XHTML 1) in favor of the CSS text-align property, which can be applied to the <div> element or to an individual <p> . For centering blocks, use other CSS properties like margin-left and margin-right and set them to auto (or set margin to 0 auto ).

How do I align text in TD?

HTML | <td> align Attribute left: It sets the text left-align. right: It sets the text right-align. center: It sets the text center-align. justify: It stretches the text of paragraph to set the width of all lines equal.

When can I use text-align?

The text-align property is used to set the horizontal alignment of a text. A text can be left or right aligned, centered, or justified.


1 Answers

Its bug is IE7 :

so look this post where in artile he discuss about the bug and solution for this bug : http://haslayout.net/css/Text-Align-Bug

Also check this post : http://css-discuss.incutio.com/wiki/Centering_Block_Element

like image 67
Pranay Rana Avatar answered Oct 11 '22 15:10

Pranay Rana