View Full Version : styling input elements?

Nov 19th, 2008, 01:45 PM
Hi All,

Just a quick question about styling input elements. If you look at:


You will see within my div if #stylized I have two input elements:

- A text box
- A Radio button

Now they are both input elements, but I want to style them differently within the #stylized div. Now I read, up and believed you do this by forcing the type ie:

#stylized input[type="text"]{

#stylized input[type="radio"]{

But as you can see neither has a style picked-up. So how is it done within a div id?



Nov 19th, 2008, 01:50 PM
#stylized input [type="radio"]
There is a space between the input and the square bracket in the CSS of your page. It should be
#stylized input[type="radio"]

However, this style won't work in IE. So the best method is to apply an extra class,say

/* style here*/

<input type="radio" class="radio" />