I have a web-site that is available in several languages, and to not have to redo the entire structure of an image slider, there is a small text that is currently being applied through the :before
(English) making use of content
(English) :
HTML
<ul>
<li class="active">1</li>
<li>2</li>
<li>3</li>
</ul>
CSS relevant
ul{
display:block;
margin:40px;
position:relative;
}
ul:before{
content: "imagens adicionais:";
position:absolute;
left:0;
top:-26px;
color:#7F8C8C;
font-family:sans-serif;
}
Problem
The solution currently in use requires that the text be in the style sheet of the web-site, which makes some translation impossible!
Question
How can I apply the content
property to the :before
selector without resorting to the style sheet?
Making use of the style
attribute or using JavaScript as a last resort!