在ie7中未使用padding [英] padding is not used in ie7

查看:97
本文介绍了在ie7中未使用padding的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在选择的性别列表中使用了填充,但在ie7中不起作用. 它在所有浏览器(例如Firefox,Safari和Safari)中均可正常运行,但无法正常工作 在iee7中,我尝试了很多,但没有任何反应...

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>

谢谢 Mayur Mate

Thanks Mayur Mate

推荐答案

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

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

这篇关于在ie7中未使用padding的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆