Mark Dain You know it's bad when you're thinking of using tables because you can't these damn divs to behave correctly
Martijn I was thinking of using tables today at work, just to get some stuff vertically-responsive-100%-height-filling. Can't use flexbox because of browser support.
7y, 28w 6 replies
🍫 Lucian Marin You can do that without flexbox or tables using this CSS class: .vertical-center { position: absolute; margin: auto; top: 0; left: 0; bottom: 0; right: 0; height: 100%; } Change height to any size that you want.
7y, 27w 2 replies
Login or register your account to reply
Martijn I have 2 elements, the first of variable height, where the second needs to fill "the remaining space" vertically. But because I don't know the height of the first element for sure (due to the text possibly wrapping when the user change the window width) I can't set the `top` correctly for the second element.
7y, 27w 1 reply
🍫 Lucian Marin You get set `padding-bottom` on the parent element and you can left `top` undefined. I always could find a workaround without flexbox or tables.
7y, 27w reply