Firefox中的字段集内容溢出 [英] Fieldset contents overflow in Firefox

查看:81
本文介绍了Firefox中的字段集内容溢出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在fieldset上遇到一个CSS问题,想知道您是否可以提供帮助?

I am having a css issue with fieldset and wonder if you could help?

我有一个宽度小于其内容div宽度的字段集.

I have a fieldset with width smaller than its content div's width.

由于内容太宽,我希望该字段集显示水平滚动条,但它只能在IE而非Firefox中使用.

I want the fieldset to display a horizontal scroll bar as the content is too wide but it only works in IE's not Firefox.

谢谢.

埃里克

这是html

<fieldset style=" width:150px; overflow:scroll;" >
    <div style="width:200px; height:50px; background:red;">
        Contents...
    </div>
</fieldset>

推荐答案

我能想到的最好的办法是在字段集中放置2个嵌套的div:

The best thing I can come up with is to put 2 nested divs within the fieldset:

<fieldset style="width:150px" >
    <div style="width: 150px; overflow-x:scroll;">
        <div style="width:200px; height:50px; background:red;">
            Contents...
        </div>
    </div>
</fieldset>

这篇关于Firefox中的字段集内容溢出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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