Here's what I'm trying to do: <html> <head> <style> body, html { width: 100%; height: 100%; margin: 0; padding: 0; } body { display: -webkit-flexbox; display: -ms-flexbox; display: flex; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } #stage { width: 100%; height: calc(100% - 65px); background: #BAD; } .bottom { flex-shrink: 0; height: 50px; text-align: center; } </style> </head> <body> <canvas id=stage></canvas> <div class=bottom> BOTTOM BOTTOM BOTTOM </div> </body> </html> Code (markup): The bottom block is adjusting to canvas height. I want it fixed. I would change canvas height dynamically via JavaScript. Thanks,
You mean you want to keep that block at the bottom while everything else can have a responsive height? One of the ways could be doing something like: .bottom { flex-shrink: 0; height: 50px; position: absolute; bottom: 0; left: 50%; margin-left: -20px; } Code (markup): https://jsfiddle.net/Lnxj2ct8/3/ (I shrunk the #stage height to 80%).