FHIR Chat · more help needed · javascript

Stream: javascript

Topic: more help needed


view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 17:39):

How can I set a div size to take as much space vertically as it can?

view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 17:39):

i have this and I want to have an empty div in the middle there
image.png

view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 17:41):

div height 100% does not work (i guess it takes 100% of the parent div, but that one is also small...

view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 17:41):

div height = 600px opens up the space but is silly

view this post on Zulip Vladimir Ignatov (Feb 15 2021 at 18:20):

The simplest solution is "min-height: calc(100vh - 100px)" where 100px is adjusted to equal the height of the header, footer and everything else you need to subtract. This would only work if everything else (other than the div in question) has a well-known fixed size.

view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 18:50):

thanks. I'll test that

view this post on Zulip Brian Kaney (Feb 15 2021 at 21:32):

(I wish the IG publisher used React components instead of jquery-based fragments)

view this post on Zulip Jose Costa Teixeira (Feb 15 2021 at 21:48):

(I wish I knew the difference :) )


Last updated: Apr 12 2022 at 19:14 UTC