Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top