height:100% not working in Internet Explorer

前端 未结 8 1156
别那么骄傲
别那么骄傲 2020-12-03 01:14

I have a question about the CSS property height:100% in Internet Explorer.

height:100% does not work in IE, but it does in Firefox and Chro

相关标签:
8条回答
  • 2020-12-03 02:01

    In IE, in order for an element to have height:100%;, all parent elements must have height:100%;. Any break in the "chain" will cause IE to ignore everything.

    It should work if your css includes the following:

    html,body { height:100%; } 
    #wrapper { height:100%; }
    .section { height:100%; }
    

    I've opened your page in IE and applied these changes using the developers tools and can verify that it works.

    0 讨论(0)
  • 2020-12-03 02:05

    Try this code

    border-bottom: 1px solid /* any color that match to your design */

    0 讨论(0)
提交回复
热议问题