Return to Snippet

Revision: 28125
at July 1, 2010 13:25 by kaartz


Initial Code
$(document).ready(function() {
    var max = 0;
    $("label").each(function(){
        if ($(this).width() > max)
            max = $(this).width();   
    });
    $("label").width(max);
});

//CSS
label, input[type="text"]{
    float:left;
    display:block;
}
label
{
    margin-right: 5px;
}
.field{
    width:100%;
    overflow:auto;
    margin:5px 0px;
}

Initial URL
http://www.jankoatwarpspeed.com/post/2008/07/09/Justify-elements-using-jQuery-and-CSS.aspx

Initial Description

                                

Initial Title
Justify Elements Using jQuery and CSS

Initial Tags
css, jquery

Initial Language
JavaScript