Why did the width collapse in the percentage width child element in an absolutely positioned parent on Internet Explorer 7?

前端 未结 7 1063
借酒劲吻你
借酒劲吻你 2020-12-13 05:20

I have an absolutely positioned div containing several children, one of which is a relatively positioned div. When I use a percentage-based w

相关标签:
7条回答
  • 2020-12-13 06:08

    The parent <div> tag doesn't have any width specified. Use it for the child <div> tags, it could be percentage or pixel, but whatever it would be,it should link to its appropriate positions:

    <div id="MainDiv" style="width:60%;">
        <div id="Div1">
            ...
        </div>
        <div id="Div2">
            ...
        </div>
        ...
    </div>
    
    0 讨论(0)
提交回复
热议问题