SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Equal columns

  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Equal columns

    I found this useful script for setting equal column height for divs.
    But is dosnt account for the padding inside the divs.

    Does anybody know how to make it calculate the toal height including the padding from the heighest column?
    Or does anybody have a script that they have used for at simular setup?


    Code:
    $('#leftcolumn, #content').equalizeHeights();
    
    (function($){
    	
    $.fn.equalizeHeights = function(){
        return this.height(
            Math.max.apply(this,
                $(this).map(function(i,e){
                    return $(e).height()
                }).get()
            )
        )
    }
    	
    })(jQuery);

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much.
    I will look into the thread :-)

    Cheers

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You nailed it for me. It was just what i was looking
    Itīs fantastic that i dont even have to use javasript or jquery :-)

    Great tutorial - i would advice others to take a look a the thread above


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •