Treehouse: Grow your CSS skills. Land your dream job.

Javascript EqualHeight for Columns

  • # December 17, 2011 at 2:10 am

    I had used this on another page and it made the columns level out perfectly.

    There is a gap under the main content area, but editing margin-height in the style.css file doesn’t seem to fix it.

    What can I do to fix this?


    # December 17, 2011 at 3:09 am

    You can use JQuery. Wrap the sidebar and main-content with a

    then add this script:

    var height = $('#content-wrapper').height();
    $('#main-content, #sidebar').css('height', height);

    Check my Fiddle:

    # December 17, 2011 at 4:19 am

    Thanks Hompimpa, but it still doesn’t seem to be working.

    I initiated it as a separate script within tags.

    Any other ideas?


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.