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.

    http://www.onedollaronebrick.com/

    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?

    Thanks!
    Adam

    # December 17, 2011 at 3:09 am

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

    then add this script:

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

    Check my Fiddle: http://jsfiddle.net/tovic/DupAU/

    # 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?

    Thanks,
    Adam

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".