Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS div height:100% of div height:auto?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30806
    soap
    Participant

    Anybody ever figure this out?

    For instance:



    blah


    blah


    blah


    Obviously that isn’t going to work but how do you MAKE it work? :P

    In other words(image), how do you achieve THIS:
    click me!!!11

    #72216
    Rob MacKay
    Participant

    If you actually want the wrapping div to be visible – say like you have a background you need to display – then you can do it like this:




    blah


    blah


    blah



    If you are talking about making the div 100% to the inside of actual wrapping div and that wrapping div being dynamic – you’re best doing that with a little Javascript : )

    #72169
    soap
    Participant

    Last time i tried with Javascript, the only idea I got was to find the height of the div but since it’s auto I always got undefined back. Is this the case?

    EDIT: Ummm nevermind, I’m stupid..

    #72170
    soap
    Participant

    $(".article_img").load(function () {
    var aheight = $("#a").css("height");
    alert(aheight);
    });

    Works great. :)

    #72171
    Chris Coyier
    Keymaster

    If you can use JavaScript, that’s great. Otherwise there are lots of fancy CSS solutions. Try googling up “Equal Height Columns”

    #72006
    soap
    Participant

    thanks chris

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.