Hi there

I'd just like to know if there's any way of making the height of every page on a website fit your screen if there isn't enough content to do so?
I've tried setting min-height to 100% but that doesn't work. Any other ideas I can try?

Recommended Answers

All 3 Replies

The solution to the problem is found by assigning a height value (100%) to the parent container, all the way up to the body/html elements.

That does not always work.

It is impossible to make a page that exactly fits any browser window, and that works on all browsers, all window sizes, and all screen resolutions and aspect ratios.

Use the above suggestion, but don't waste your time trying to get it to always work.

One of things I always do in css is

{ height: 100%; /*required for all browsers*/ }

Not sure if this will help you though?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.