IE6 and fieldset background color?

时光毁灭记忆、已成空白 提交于 2019-12-14 03:13:09

问题


Hey, I'm having some difficulty with CSS and IE6 compatibility.

URL: http://bit.ly/dlX7cS

Problem #1: I put a background image on the fieldset around Canada and United States. In IE6 and IE7, the background bleeds above the border-top of the fieldset.

So, I found a fix. It is applied only to IE browsers, and moves the legend up a few pixels, aligning the background correctly.

<!-- Fix: IE6/IE7, Legends -->
<!--[if lte IE 7]> 
    <style type="text/css">
        fieldset {
            position: relative;
        }
        fieldset legend {
            position: absolute;
            top: -0.5em;
            left: 0;
        }
    </style>
<![endif]-->

This fixes IE7. But in IE6, it seems to make my legend for Canada vanish completely. Any suggestions on how to fix it?


回答1:


IE6 fieldset fix: http://www.gunlaug.no/tos/moa_18.html

For the iframe bug try setting an overflow:hidden for IE6. (you can do it like _overflow:hidden; (underscore is a ie only hack)

Next time split two different questions - it's easier for others searching for same problem.



来源:https://stackoverflow.com/questions/2453182/ie6-and-fieldset-background-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!