How can I get a left-navigation column to fill the entire left side of the middle of a webpage using CSS?

Tags: css

Problem :

I'm working on making this web page:

and I want to get a left navigation area to extend all the way down the left side, from the bottom of the header to the top of the footer. I tried setting height: 100% but that didn't seem to work. Is there something I'm doing wrong here?

Solution :

This will never work the way you're expecting it to. You cannot set a 100% height to the element as it will go to 100% of its content, not the height of its parent container.

What I recommend doing is removing the background from the leftNAv area, and instead, set a repeating background on div id="middleArea" with the grey part as repeat-y. that way, no matter how big the #middleArea gets, the background will expand regardless.

You can try resources like Faux Columns which may give you the templates and other results you're looking for:


    CSS Howto..

    How to center checkbox vertically in a table-cell?

    How to resize animated gif with HTML/CSS?

    How do I specify in HTML or CSS that a table column should have the minimum width

    how to add bootstrap, css, images ,js into google app engine?

    How to prioritize a CSS class?

    Foundation 5-How to center position the class 'row' regardless the browser size?

    How does google elegantizr work?

    How to get rid of the border bottom from my navigation

    showing a css component for a specified number of seconds

    How to make a horizontal div scroll bar float like a fixed CSS div

    How to precompile scss to a single css file in webpack?

    HTML+Javascript: How can I Load Data in Div via Class?

    How to change default message “Please enter a value with a valid mimetype.” for HTML file input

    How to implement cross-context CSS image cursors?

    How to set expanded menu to be shut on page load

    how to have a css in javascript when onsubmit trigger in another window?

    How are CSS frameworks used?

    CSS: how to “plot” invisible text over an image?

    how to apply css class condtionally in angularjs

    How to place an image and text under it, side by side using HTML and css?

    How to set a image over another in the same tag via CSS?

    how to show images with it's original smoothness in IE

    How to get a table-cell aligned to the right?

    How to display text over an image css [duplicate]

    how to horizontally center a div of 10000px (wider than full screen) in CSS?

    How to get the perticluar image from large set images in one image using css

    how to align buttons in css/html in one line horizontally?

    How to adjust items in an ordered list without affecting sub-lists?

    How to create a horizontal navigation in HTML/CSS above an image?

    How can I set a border in alignment with other borders