100% left div section required
Question by user1356607
I have two divs (red and yellow). Red div has 100% height and Yellow div in fixed 1000 pixel. I want red div 100% of the window screen even I scroll down the page, but it is not taking 100% height of the browser screen. I tried to find so many examples but failed to resolve my issues. Please guide…
Here is the example i have done.
Answer by Mateusz Kocz
Is this what you want?
Then you need to change three things:
- body’s and html’s height to min-height;
- body’s and html’s position to relative;
- you don’t need !important in .left-menu’s height.
Answer by Starx
It doing what it is suppose to do !!!
This is really a misunderstanding.
Your style of height: 100%
applies to .left-menu
. But inside this .left-menu
, you have another div called .left-footer
, which has green as its background. So, the CSS is doing what is coded to do.
It order to span the red above the entire left area, you dont have to do anything. It is already doing that. For the proof see this.
So, there is nothing to fix. This is a design flaw.