Is there a way of hiding an element's contents, but keep its :before
content visible?
Say I have the following code:
HTML:
<span class="addbefore hidetext">You are here</span>
CSS:
.addbefore:before {
content: "Show this";
}
.hidetext {
// What do I do here to hide the content without hiding the :before content?
}
I've tried:
display: none
and setting display: inline
on :before
, but both are still hidden width: 0; overflow: hidden
;, but then additional space seems to be added (?) text-indent: -....px
, but
Any other ideas as to how I might do this?