0

For the purpose of practicing JQuery, my intention was to have a solid red 3 px border around all the "input" of the form at this fiddle http://jsfiddle.net/mjmitche/M9R8g/

However, as you can see, there is no red border around the check boxes and radio buttons.

Can you tell me what I have done wrong?

1
  • I don't think is possible using only css. Commented Apr 2, 2011 at 7:49

4 Answers 4

2

Add a span/div with border like this to overcome lack of styling for checkboxes in browsers.

http://jsfiddle.net/M9R8g/9/

Sign up to request clarification or add additional context in comments.

2 Comments

hmm .. soz .. but i just wonder why this answer got accepted. ok: you're skinning the element surrounding the element you want to skin, but that's not what you wanted to do in the first place .. no offense though!
probably because a workaround it's better then nothing. Nobody likes to hear: there's not way to do this.
1

Basically checkboxes behave little bit of notoriously across browsers. You can use images to style checkboxes in a cross browser and reliable way.

Another option is to use some jquery plugin like this one.

Comments

1

did you want to make all input border become red? try to use class during set up the color in CSS instead of div.

But if checkbox or radio button i think you can't do that by use a default package like jquery. try to use another plugin use search engine.

Comments

0

Nothing: unfortunately you cannot skin radio-buttons or checkboxes (it wouldn't work if you would add a style to them in the markup either)

1 Comment

but it worked for the person who's running the tutorial that I'm following. I also added two more commands that worked for the tutor at this fiddle jsfiddle.net/mjmitche/M9R8g/6 but they don't work for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.