content: "here";

Is it possible to do this because I can't get it to work?

CSS:
span.dog{
display: inline;
content: "dog";
}

HTML:
<span class="dog"></span>span.dog:before {content: "dog"}I believe it's not supported by IE :rolleyes:, so I wouldn't use this technique for anything important.I have dynamic content that I am hiding or displaying using javascript to change display: inline to display: none and vise versa. The problem with this is if styles are switched off the page is a mess.

How could I do it differently?
 
Back
Top