Html ie7中没有使用填充

Html ie7中没有使用填充,html,css,internet-explorer,internet-explorer-7,Html,Css,Internet Explorer,Internet Explorer 7,我在性别选择列表中使用了填充,但在ie7中不起作用。 它在所有浏览器ie8、firefox、safari中都能正常工作,但不能正常工作 在iee7中,我尝试了很多,但什么都没发生 <div class="clear" style="margin-top:5px; float:left; text-align:right"> <% @sex = [['male', '0'],['female', '1'], ['others',

我在性别选择列表中使用了填充,但在ie7中不起作用。 它在所有浏览器ie8、firefox、safari中都能正常工作,但不能正常工作 在iee7中,我尝试了很多,但什么都没发生

<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>

“左侧填充:15px;宽度:100px;
高度:30px;左侧填充:15px;垂直对齐:中间;“%>
谢谢
Mayur Mate

只需在div中添加display:inline块,并使用适当的DOCTYPE,例如

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

在样式表中包含如何设置“clear”类的样式可能很有用。