Jump to content

Recommended Posts

Hi there,

I am hoping to create a container that starts part way down a page, and fills out the majority of space below it (minus some padding before the footer). I wrote the following:

min-height: calc(100vh - 15.44rem);

The rem size is the 247 pixels above and below that it isn't to fill out. This works, until the base font size is increased. Is there a solution to keeping this the correct min height? I could have just written the px value, but the elements above are rem sized as well so these will push the container down when the base font size is increased.

Hope that makes sense?


Link to post
Share on other sites

min-height doesn't stop your container from expanding to fit its contents. It just prevents it from getting smaller.

You're probably looking for something like max-height for this issue. Or even a fixed height.

Edited by Funce
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...