css - jQuery container height() not calculated properly -
css - jQuery container height() not calculated properly -
$('.container').height(); gives wrong value when it's kid elements have spacing css attributes on it:
<div class="container"> <div style="padding: 10px;"> weiorng3poin4gr9p34ng9p34n5g934ng5o43ng534g <div style="margin: 20px; "> eiong349ng49ng934ng59p34n5g439g5 </div> </div> </div> how can right height of .container ?
does container <div> have padding/margin/border? if so, can seek this:
$(".container").outerheight(true);//will consider margin , border width well. jquery css jquery-selectors height
Comments
Post a Comment