Skip to content Skip to sidebar Skip to footer

Reducing The Height Of A Div By A Set Amount?

I have a div that can dynamically grow; but due to some of the elements being higher than what they are by having a position: relative; the div is a little taller than what it need

Solution 1:

Probably could with calc():

height: calc(100% - 20px);

Solution 2:

Please try this:

div {
   height: calc(100% - 20px)
}

Post a Comment for "Reducing The Height Of A Div By A Set Amount?"