简体   繁体   中英

css problems in IE11

I'm working on a web application and it goes without saying that cross browser is very important to me. My application works great on all browsers BUT IE11.

The piece of css in question is very simple

html,body {
    height:95%;
}

This is not working in IE11 and the page height is bigger than 100% of the screen.

The application is huge so I will not post small pieces of code which would only confuse you guys.

My question is: Any obvious issues with IE11 Height ? or should I be looking elsewhere ?

By default, pages have margin. This means that in the absence of any CSS at all, your content will not squish against the edges of the window.

You must override this with margin:0 if you wish to have control over the exact height of your document.

First, seperate your body from the comma. Then use vh like here:

html, body {
    height: 100vh;
}

this stackoverflow question might help

I'm pretty sure there are no issues with IE11 (even if I hate it) Your Code Should be like the code below.

body{
       height: 95%;
 } 

try adding height: 100vh; to your css class. It is fully supported in ie 11

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM