【问题标题】:Text box creates gap when floated left in IE7文本框在 IE7 中向左浮动时会产生间隙
【发布时间】:2012-07-28 10:47:39
【问题描述】:

我有一个左圆角框 -> 文本框 -> 右圆角框,它们都构成了搜索框的一部分。在 FF、Chrome、IE8 中一切正常,但在 IE7 中不行。

我已经使用调试工具对其进行了检查,并且我尝试了许多选项,目前没有一个选项可以工作,所以我希望有人知道这个问题(错误)可能是什么?

这是我的代码的 sn-p:

<div class="roundBox4">
  <img src="../App_Themes/MyChoice2010/Images/reality-box-top.gif" width="228" height="8" /><img
                    src="../App_Themes/MyChoice2010/Images/reality-box-locate.gif" width="228" height="49" />
                <asp:ContentPlaceHolder ID="Box4Content" runat="server">
                </asp:ContentPlaceHolder>
                <div class="locateABroker">
                    <img src="../App_Themes/MyChoice2010/Images/locate-broker-left.gif" class="locateBrokerLeft"
                        height="19" width="3" /><asp:TextBox ID="TextBox1" CssClass="locateBrokerCenter"
                            runat="server"></asp:TextBox><img src="../App_Themes/MyChoice2010/Images/locate-broker-right.gif"
                                height="19" width="3" class="locateBrokerRight" />
                    <a href="" class="locateBrokerSubmit">Submit</a><img src="../App_Themes/MyChoice2010/Images/box-arrow.gif"
                        class="linkArrow" width="8" height="14" />
                </div>

【问题讨论】:

  • 调试工具说填充来自哪里?

标签: search internet-explorer-7 rounded-corners


【解决方案1】:

关于 IE7,我唯一能说的就是您几乎需要在 CSS 中声明所有内容。继承在 IE7 中非常糟糕。我会确保您 a) 使用良好的 reset.css 和 b) 尝试直接在给您带来问题的元素上声明任何填充等。

【讨论】:

  • 谢谢汤米!我试过你的选择,但没有快乐。然后我使用了旧的 css_browser_selector.js 来整理它。肮脏的我知道,但如果 IE 想把卫生纸带到擂台上,它一定会发生 :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-04-01
  • 2012-03-24
  • 1970-01-01
  • 2010-09-21
  • 1970-01-01
  • 2017-12-06
  • 1970-01-01
相关资源
最近更新 更多