I would like a div to be 100% height minus 197px on every screen. I have used the CSS function cal as follow.
<style>
#div1 {
left: 300px;
height: calc(100% - 197px);
border: 1px solid black;
background-color: yellow;
}
</style>
p>Create a div that stretches across the window, with a 50px gap between both sides of the div and the edges of the window:</p>
<div id="div1">Some text...</div>
It works so far on most browser except for Firefox where it only works when I add position: absolute;
My problem is that Position absolute creates a conflict with some of my previous code. So my question is How to use calc in CSS for mozila firefox without position absolute ?