I want to hide text which is in <span>
. but why it's not working?
.pdf {text-indent: -9999}
<p>
<a href="reader_overview.pdf" title="Open in a new Window" target="_blank"><img src="pdf.gif" alt="PDF" width="16" height="16" />
<span class="pdf">PDF 34KB, Opens in a new window</span> </a>
</p>
Use .pdf {display: none}
I thought hiding with CSS worked like this:
.pdf {
display: none;
}
text-align
Applies to: block-level elements, table cells and inline blocks
— http://www.w3.org/TR/CSS2/text.html
Span is, by default, inline.
The value it takes is also a length and so requires units if the value is non-zero.
There seems little point in including the information in the document if you are going to hide it though. I assume you are trying to provide information to screen reader users instead of all users … but that information is as useful to people not using screen readers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With