Jump to content

css3, I want to add :after at input:focus:invalid but doesn't work


harinezumi
 Share

Recommended Posts

Hallo, I'm trying to add a unicode HEAVY CHECK MARK ✔ and HEAVY BALLOT X ✘ to the input:focus:valid and input:focus:invalid respectively.I don't want to use a background-image as in many samples I found online.So I tried:

input:focus:invalid:after,  textarea:focus:invalid:after {content:"\2716";}input:focus:valid:after, textarea:focus:valid:after {content:"\2714";}

I also tried content:"X" and content:"OK" in case the problem was unicode.But this doesn't produce any result. Any idea?My documents are HTML5 and CSS.Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...