Home › Forums › CSS › is there another way › Re: is there another way
June 14, 2010 at 3:29 am
#77754
Member
you can fix this using jQuery by putting an inline level element like a span within a block level element like a div or h2.
Html:
Code:
aurel
CSS:
Code:
h2 { padding: 60px; height: 114px; }
jQuery:
Code:
$(function(){
$(‘h2’).each(function(){
$(this).width($(‘span’, this).width())+120; //add paddingx2
});
});
$(‘h2’).each(function(){
$(this).width($(‘span’, this).width())+120; //add paddingx2
});
});