Skip to content

Instantly share code, notes, and snippets.

@dewski
Created February 14, 2011 22:31
Show Gist options
  • Save dewski/826727 to your computer and use it in GitHub Desktop.
Save dewski/826727 to your computer and use it in GitHub Desktop.
var dt = $('.form dt');
if (dt.parents('fieldset').size() == 0) {
dt.css('width', maxLabelWidth + 'px');
var ddWidth = $('.form').width() - 45 - maxLabelWidth;
$('.form dd').css('width', ddWidth+'px');
$('.form dd input').css('max-width', ddWidth+'px');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment