How do I replace "Bookmarks" with "Links" using CSS?
<div class="lfr-panel-title">
<span> Bookmarks </span>
</div>
I know CSS was not intended for this, but is there a cross-browser way?
How do I replace "Bookmarks" with "Links" using CSS?
<div class="lfr-panel-title">
<span> Bookmarks </span>
</div>
I know CSS was not intended for this, but is there a cross-browser way?
You could do something crazy like this.
.lfr-panel-title span{
display:none;
}
.lfr-panel-title:after{
content: "links";
}
But like everyone points out.. its not recommended.
CSS does not change or replace exact text.
You need to use some sort of client-side language (JavaScript, jQuery, etc.) or server-side language (php, ASP.NET, etc.) to achieve that.
As @Loktar states, you can mimic that functionality via the :before
and :after
pseudo selectors.
Although, it is not recommended for that use, and it is not fully cross-browser compatible when take into account IE. Look at the cross-browser compatibility chart via QuirksMode:
Short answer: no.
Long answer: CSS is not intended, or very capable, at manipulating content. You could replace the text using a background image, but that is not very accessible. The various :after or :before techniques would also not be very cross-browser compatible.
You will need javascript to manipulate content in this manner.