0

I'm struggling creating a CSS style.

This is what I've got: http://jsfiddle.net/WhNRK/26/

It was designed for a label, but now I'm trying to modifying for something like this:

<input type='radio' name='mcq' id='radio-choice-1' value='1' /> 
<div class='container'>
<label for="radio-choice-1" onclick="">Choice 1</label>
</div>

So if I did this, I broke up the design. Someone can help a little bit? This is a radiobutton style for an iPad.

2
  • What is the problem/question? Commented Jan 18, 2013 at 5:34
  • What style are you trying to apply to which element? Commented Jan 18, 2013 at 5:36

2 Answers 2

3

Change the CSS selector to match your new markup:

#question input:checked + div > label {

Demo

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

Comments

1

You just remove #question input from your css and make the name of #question label as #question label.

Change the code as follows:

<div id='question'><form name='mcForm'>
  <div class='container'>
    <input type='radio' name='mcq' id='radio-choice-1' value='1' /> 
    <label for="radio-choice-1" onclick="">Choice 1</label>
  </div>
</div>

Comments

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.