views:

85

answers:

2

I've tried the following:

:checked + *  
{  
font-weight: bold;  
}

With the following html:

<p><input type = "radio" name = "blah" />some text</p>

How would I go about styling such text?

Solution:

Throw label tags around the text, and select with
:selected + *

It works in opera and ff3, so I'm good.

A: 

Use css on the appropriate tag around the text.

To change depending on checked or not you would need to use css and javascript to update the style it uses.

jim
+2  A: 

You use the label element to associate text and other inline content with form inputs:

<input id="foo" ...> <label for="foo" ...>foo text</label>

And then select with [for="foo"] or #foo + label or whatever.

Anonymous