locked
2 column auto heights RRS feed

  • General discussion

  • I have two columns in the main section of my website (http://blackbeltnerds.com/sandbox/index.html). The left column (below the masthead) has a navigation panel, while the right is for the main content.

    I would like the color background in the nav panel to stretch down to match the size of whatever happens to be in the main content area on that page. I think I have to do something with the min-height and height parameters of the navpanel div.

    However, nothing I try works the way I want it to. I suspect I'm just missing a keyword in my searches (here and on W3Schools), but I can't find an article that explains it.

    Can anybody point me to something that can help?

     

    Thanks!

    • Changed type Daddicus Friday, December 2, 2011 2:29 PM That's what it should have been from the start. I didn't know that, though, when I posted.
    Tuesday, November 29, 2011 8:51 PM

All replies

  • Assign the background color to: <div id="container"> instead of navpanel
    Expression Web MVP
    Tuesday, November 29, 2011 9:58 PM
  • Tuesday, November 29, 2011 10:08 PM
  • For several different variations on the theme, google the term "equal height columns." You will find a number of ways to address the resolution. Take your pick...  ;-)

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    Wednesday, November 30, 2011 1:12 AM
  • Thanks, all!

    I actually used pieces of Steve's and Scott's suggestions. Googling "equal height columns" got me to http://www.positioniseverything.net/articles/onetruelayout/equalheight, which outlined the process. Adding Steve's comment to move the background color to the div outside of the navpanel (which I created as part of that web page's suggestions) moved the color to the whole page (between the masthead and the footer).

    Pat, thanks for the suggestion, but I wasn't able to figure out how to get all of her materials. Still, I've bookmarked her site, since there looks to be a lot of interesting stuff there.

    Thanks bunches!

    Jim

    Wednesday, November 30, 2011 7:44 AM
  • What happened to the "mark as answer" buttons? I don't see any in any of your posts.

    Jim

    Wednesday, November 30, 2011 7:51 AM
  • What happened to the "mark as answer" buttons? I don't see any in any of your posts.

    Jim

    That's because you created this thread as a discussion instead of a question. I don't remember if you can change the type after it's created. If you can change it to a question, you can mark answers, but otherwise you can't.
    Jim

    “I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, and that enables you to laugh at life's realities.” - Dr. Seuss
    Wednesday, November 30, 2011 6:43 PM