I'm trying to hide some text inside an <li>
element using CSS by setting text-indent: -999px;
.
For some reason this doesn't work when I set the direction of the document to "rtl"
(right to left - my site is in Hebrew).
When direction is "rtl" the text still shows...
Anyone knows why, and a way around this?
views:
186answers:
2yes, doesnt work
Crippletoe
2010-05-10 10:03:12
i have tried a positive indent. it makes sense that it should work but it doesnt.
Crippletoe
2010-05-23 09:43:46
A:
The text-indent: -99px
is an old trick, which is not the optimal way to hide text. Why not use visibility:hidden
instead?
Tomer Cohen
2010-05-15 23:15:24
Presumably this is an attempt to use a **background** image as content and provide real text for screen readers instead of using an `<img>` element with an `alt` attribute.
David Dorward
2010-05-15 23:18:12
i cannot use visibility:hidden because i just need the text to go away. not the whole element in which the text is placed.any solution?
Crippletoe
2010-05-16 10:47:56