Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS help - stretching div's vertically?

  • 05-08-2009 06:14PM
    #1
    Registered Users, Registered Users 2 Posts: 872 ✭✭✭


    Hey, I'm trying to do something using CSS. I'm looking to set it up a type of results page using containers.

    The problem i'm having is that it when the results get too long for the container they're in the container won't stretch to accommodate them.

    The closest i can find to the area that might be wrong is the overflow of the container. Does anybody know what I might be doing wrong?

    Here are some samples of the problem:
    http://swoponomics.com/test-hidden.html
    http://swoponomics.com/test-scroll.html
    http://swoponomics.com/test-visible.html


Comments

  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    You have position : absolute; on #leftresult and #rightresult which is causing problems. There's no need for it.

    Starting with your test-hidden.html ::

    remove height:300px; from #rightnavigation
    remove position: absolute; from both #leftresult and #rightresult
    add float : left; to both #leftresult and #rightresult

    ...and that should do the trick.

    You'll probably then need to add a clear : left; to any element you want to put underneath those two, to clear the left floats.


  • Registered Users, Registered Users 2 Posts: 872 ✭✭✭gerry87


    Thanks, worked perfectly on that test page. Just trying to get it going on the real one, the code's just a tad messy! I'll keep you posted.


Advertisement