views:

43

answers:

1

Hi All,

I used a padding in select list of gender but its not working in ie7. its working properly in all browser ie8, firefox, safari but not working in iee7 i tried a lot but nothing happened...

<div class="clear" style="margin-top:5px; float:left; text-align:right">
                          <% @sex = [['male', '0'],['female', '1'], ['others', '2']] %> 
                          <%= select_tag :sex,
options_for_select(@sex), :style=>"padding-left:15px; width:100px;
height:30px;padding-left:15px;vertical-align:middle;" %>
</div>

Thanks Mayur Mate

+4  A: 

Just add display: inline-block in your div and use a proper DOCTYPE such as

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
Sohail