good_evening
good_evening

Reputation: 21749

Give style for »

How can I write style for this characters: &raquo; Is it possible? Or I have to write <span class="class_name">&raquo;</span> to style this symbol? Thank you.

Upvotes: 0

Views: 925

Answers (2)

Quentin
Quentin

Reputation: 943547

You can't select pieces of text with CSS. Only elements and pseudo-elements. Depending on context, :first-letter has the best hope of being able to match that.

You will probably have to add an element to select. It doesn't have to be a span or have a class.

It is possible that using <q> and then adding the quote character itself with :before / :after would be a better approach.

Upvotes: 1

Christofer Eliasson
Christofer Eliasson

Reputation: 33865

You can not style individual symbols with CSS, so as you say, you would have to wrap it in a span or other styleable element and select on that.

Upvotes: 1

Related Questions