Styling Checkboxes and Radio buttons with CSS

Posted by on November 2, 2011 in Web Servers, Website Design | 0 comments

If you’re trying to use a style sheet and are wondering why you can’t change say the border around a checkbox the same way you’re changing the border around text boxes, don’t fear, because it’s not the same syntax. Even though they’re inputs, if you want to target them specifically, you need to use the syntax below. Using that, you can target any of the sytle options you may want to change.

input[type=”checkbox”],
input[type=”radio”]
{
border:5px solid #ffffff;
}
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>