webmasters webmasters - 2 months ago 7
CSS Question

Adding double quotes to a paragraph with CSS

Lets say I have this paragraph:

<p class="myclass">This is my paragraph</p>


What is the CSS code to add double quotes to this paragraph? (So it will render "This is my paragraph")

.myclass {}

Answer

Use pseudo-elements:

p.myclass:before, p.myclass:after {
    content: '"';
}

Fiddle: http://jsfiddle.net/2bE8j/1/

Comments