I want to hide text which is in <span> . but why it's not working?
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">&l开发者_运维技巧t;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 want to hide it, use the CSS that is intended for that purpose:
.pdf { visibility: hidden; display: none; }
try this
.pdf {display: block; height: 40px; line-height: 200px;}
精彩评论