Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

radio buttons disappear in ie and chrome

The below is in style sheet

 select,input ,td a {border:1px solid green; width:25%;height:25px;font-size:20px;margin-  left:.1em;}
input.myradio {border:none;width:0%;height:0%;font-size:0%;}

The below is in html

<td><input class="myradio"  type="radio" name="poolstatus" value="Add">Add</input><td>

It's perfect in firefox but chrome and IE are not showing radio buttons? Why so?

like image 217
dhaval Avatar asked Jun 17 '09 18:06

dhaval


3 Answers

It's because you have told the radio button to be 0% tall - which is 0px - which is not there.

You can override this by telling the height and width to be 'auto' which will reset them (unless there's a rule which is more specific somewhere else in the stylesheet)

input.myradio {
  border:none;
  width:auto;
  height:auto;
}
like image 70
iblamefish Avatar answered Nov 17 '22 09:11

iblamefish


My guess is the "width:0%;height:0%" in your input.myradio class. you need a width and height.

Try this:

input.myradio {border:none;width:1em;height:1em;}
like image 30
jwl Avatar answered Nov 17 '22 10:11

jwl


Why do you have a height and width specified of 0% for them? I'm guessing that is why IE and Chrome are not showing the radio button,s because they have a size of 0 pixels.

like image 1
ylebre Avatar answered Nov 17 '22 09:11

ylebre