Given the code bellow, how do I style the radio buttons to be next to the labels and style the label of the selected radio button differently than the other labels?
The first part of your question can be solved with just HTML & CSS; you'll need to use Javascript for the second part.
I'm not sure what you mean by "next to": on the same line and near, or on separate lines? If you want all of the radio buttons on the same line, just use margins to push them apart. If you want each of them on their own line, you have two options (unless you want to venture into float: territory):
s to split the options apart and some CSS to vertically align them:
Styling the is why you'll need to resort to Javascript. A library like jQuery
is perfect for this:
The focus and blur hooks are needed to make this work in IE.