Registered

@charset "utf-8"; /* CSS Document */*{padding:0; margin:0; width: 100%; height: 100vh;} 

but IE does not see height: 100vh

  • what can be done? - Alex Ander
  • What version of IE? - chromigo
  • Internet Explorer 11 - Alex Ander
  • one
  • @AlexAnder Try using a more specific selector, instead of * write, for example, body - Klimenkomud

2 answers 2

Instead of vh and vw, we use percentages, but in order for the height to work in percent, the parent element also needs to specify the height:

 html,body { height: 100%; width: 100%; } div { float: left; width: 32.333333%; margin-left: 1%; height: 49%; margin-top: 1%; background-color: red; } 
 <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> 

    If you set the height twice.

    First - height : "height for none and those browsers that do not know vh"
    And then - height: 100vh

    Browsers who know this value will take height: 100vh and grind the previous height. And who do not know - take the previous height: