IE6浮动和高度

发布于 2024-08-20 09:30:30 字数 849 浏览 2 评论 0原文

你好,我有 2 个浮动的 div,而 IE6 在高度上失败(它不是从 css 设置的)。如果我有字母 g、p、j,则会切断这些字母的末尾。

这是代码

    <div class="left"> <!-- this div float left -->
    <span style="color:#666;">Legend : </span> <!--  Here the letter g is cut -->

    <a title="" class="button" href="#">Choice 1</a>
        <span class="button" style="padding-right:12px;">
            <b>Current Choice</b>
         </span>        
   </div>

   <div class="right"><!-- this div float right -->
    <span style="color:#666;">Legend 2 : 1 &nbsp; Legend3 : 1-5</span> <!--  Here the letter g is cut -->       
   </div>
  <div class="clear"></div> 

如果我在左侧设置高度,右侧 div 工作正常,但我无法知道内容的高度。

有没有其他解决方案可以使其在不设置高度的情况下工作。

谢谢

Hi i have 2 divs that floats and IE6 fails on height (its not set from css). If i have letters as g,p,j its cut off the end of these letters.

Here is the code

    <div class="left"> <!-- this div float left -->
    <span style="color:#666;">Legend : </span> <!--  Here the letter g is cut -->

    <a title="" class="button" href="#">Choice 1</a>
        <span class="button" style="padding-right:12px;">
            <b>Current Choice</b>
         </span>        
   </div>

   <div class="right"><!-- this div float right -->
    <span style="color:#666;">Legend 2 : 1   Legend3 : 1-5</span> <!--  Here the letter g is cut -->       
   </div>
  <div class="clear"></div> 

If i set a height at the left,right divs its working fine, but i can not know the height of the content.

Is there any other solution to make it work without set the height.

Thansk

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒儿 2024-08-27 09:30:30

我似乎无法在 IE6 中重现这一点。尝试设置 div 标签的 line-height 属性。这可能有帮助。

I can't seem to reproduce this in IE6. Try setting the line-height property of your div tags. That might help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文