cosmos_mariner
cosmos_mariner

Reputation: 1

Blank area at the bottom of page as a result of relative positioning (CSS)

One of my divs' default position is about 800px down the page. I corrected that with:

position: relative;
top: -800px;

Now that I've moved everything up by 800px, there is a 800px gap at the bottom. I tried fiddling with the height, but 'auto' and '100%' does nothing, and '___px' messes up the layout.

How can I get rid of the gap?

Upvotes: 0

Views: 27

Answers (1)

joeCEB
joeCEB

Reputation: 89

try using max-height: 100vh in your styles. max-height sometimes works better then height (it depents on what your trying to do). vh just a different % method.

Upvotes: 1

Related Questions