Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3488212
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:14:36+00:00 2026-05-18T11:14:36+00:00

So, I have a CSS style defined for a radio/checkbox when it has the

  • 0

So, I have a CSS style defined for a radio/checkbox when it has the checked=”checked” value

input[type=radio][checked=checked] {
  /* CSS */
}

This works great whenever a fresh page is loaded, but when a radio/checkbox is toggled on the page, the DOM never adds checked=”checked” to that HTML tag… Therefore, my CSS doesn’t work.

I tried using jQuery to add the checked=”checked” attribute, but that only checks/selects the radio/checkbox, it doesn’t actually add the checked=”checked” attribute.

Can I change my CSS selector/do something with jQuery to fix this!? It’s driving me insane. I consider myself a fairly skilled coder with CSS and jQuery and this is a rather trivial matter, but I just can’t wrap my head around it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:14:37+00:00Added an answer on May 18, 2026 at 11:14 am

    Okay, well for anyone else who has this problem…

    Instead of using [checked=checked] in the CSS, I tried :checked (CSS3 selector) and it works. Although I’m not sure it’s supported in earlier browsers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example I have a css style like this : input.validation-passed {border: 1px solid
I have got this css: <style type=text/css> #heading{ margin:auto; background-color: brown; } </style> and
I have a CSS class defined, call it: <style type=text/css> .Foo { position: fixed;
I have this CSS style that does a rounded corners for div border, but
I have some CSS style that does not work in IE and that works
I have this in my CSS file: body {style.css (line 3) background:#CDF8FF url(images/final_bg.jpg) no-repeat
newbie question in css: I have the following style defined: TABLE.tabulardata th { font:
This might be a basic CSS question: I have a site designed with well-defined
I have a generic css style defined for table,tr,td in external css file as
I have applied CSS style to JavaFX components and it looks like everything is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.