Jump to content
Akhil Gupta

issue in Css :checked selector

Recommended Posts

The <option> element does not have a :checked state, only checkboxes and radio buttons do. Furthermore, <option> elements cannot be styled.

Share this post


Link to post
Share on other sites
1 hour ago, Ingolme said:

The <option> element does not have a :checked state, only checkboxes and radio buttons do. Furthermore, <option> elements cannot be styled.

Actually for HTML5

Quote

:checked

The :checked pseudo-class must match any element falling into one of the following categories:

input elements whose type attribute is in the Checkbox state and whose checkedness state is true

input elements whose type attribute is in the Radio Button state and whose checkedness state is true

option elements whose selectedness is true

Although browser support is very limited.

Edited by dsonesuk

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...