I am attempting to ensure that the #output
element fills the remaining space on the page, considering the presence of a navbar. Many solutions online recommend using min-height: 100vh
, but this does not account for the navbar (borrowed from Bootstrap's website).
The desired outcome is to have the <nav>
and the .container
occupy the upper portion of the screen, with the #output
occupying the remainder of the container space not allocated to the <img>
and <div>
, all without overflow.
Please refer to the JSFiddle link for reference: https://jsfiddle.net/Lfyh2bz9/1/
(Note: I am aware that it would be best practice to move style-related information into a separate CSS file, but my primary focus is getting it functional first :) )
How would you approach this? Would you designate the <nav>
as a .container
and utilize flexbox
? Convert the .container
measurements to rem
units like the <nav>
? Or perhaps calculate the remaining height dynamically using CSS?
Thank you in advance, --J.
Edit: Alternatively, setting the container items to 25%-50%-25% widths (OR making the output area equivalent to 3 lines) could serve as a viable solution, provided it remains proportional within the container!