...

View Full Version : styling input elements?



stfc_boy
11-19-2008, 01:45 PM
Hi All,

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

http://www.inspireaway.co.uk/test.php

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?

Thanks

Chris

abduraooft
11-19-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

input.radio{
/* style here*/
}

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum