1

I have setup a site with content region of fixed width and variable height, horizontally and vertically centred, based on the css and html found in this answer.

That works pretty fine in all Browsers I have tested, even in IE (11). However the page needs to work in fullscreen mode, too and if i run it in ie, the content goes to the upper left corner.

here is my html:

div.wrapper-1 {
 display: table;
 position: absolute;
 height: 100%;
 width: 100%;
}

div.wrapper-2 {
 display: table-cell;
 vertical-align: middle;
}

div.wrapper-3 {
  margin: 0px auto;
  width: u($page-width);
}
<body>
    <div class="wrapper-1">
        <div class="wrapper-2">
            <div class="wrapper-3">
            <!-- does all my content go -->
            </div>
        </div>
    </div>
</body>

What can I do to make that work in fullscreen, too?

Thanks for help!

Community
  • 1
  • 1
philipp
  • 15,947
  • 15
  • 61
  • 106

2 Answers2

2

Finally, after digging around I could get it up and running!

I added that to my css:

html {
    width: 100%;
    height: 100%;
}
philipp
  • 15,947
  • 15
  • 61
  • 106
0

On your div.wrapper2 and 3 set a position:relative; This will keep it relative to your div.wrapper1 and should solve that issue. This is also found on the second part of the answer you linked.

Screech129
  • 110
  • 5