Text Indent and Text Align

Like most web designers if I have a link or button that uses a background image instead of text I leave the text in anyway but hide it using text-indent: -9999px;.

A problem occured for me where the text was just not moving and I found out it was a text-align: right in a parent element that was causing the problem. I had no idea that these 2 classes effected each other.

To fix the problem just make the text-indent a positive number like 9999px. It seems that the text-indent switches direction based on the text align which make sense when you think about it.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>