Leon
Leon

Reputation: 141

Content css before option in safari not work

i have used checkbox symbol for option in select dropdown with css selector before, but in safari not work (chrome and firefox is ok).

option:before { content: "☐"}
option:before { content: "text"}

I can't understand why, i have try another tag in option but nothing.

Upvotes: 0

Views: 280

Answers (1)

vovchisko
vovchisko

Reputation: 2239

I assume you trying to add a check symbol to the <option> element inside the <select>, right?

<select> doesn't support pseudo-selector and its behavior system-dependent.

Also, if you're using custom fonts - some special characters might be missing for this font. So make sure your font has all characters you need, or specify a web-safe font like in this example.

checks

Upvotes: 1

Related Questions