javascript - HTML section and div fixed size -
i'm trying fix height of div inside section 100px. however, no matter try, height reverts 'auto' , re-sizes depending on amount of content in div.
here's html code:
<section id="social" class="tab-content active"> <div id = "socialdiv"></div> </section>
and here's i've tried far
css:
social{height:100px; line-height:20px;overflow:hidden;} .socialdiv{height:100px !important; line-height:20px;overflow:hidden;}
jquery:
$('.socialdiv').css({'height':100+'px'}); $('.socialdiv').height( 100 );
unfortunately none of these work. i'd appreciate , on this.
ps. don't know if matter or not, part of chrome extension , section part of popup window displays during execution.
you mixing id
(#
) class
(.
)
your class tab-content
you're trying change id social
on both js , css.
try:
$('.tab-content').css({'height':100+'px'}); $('.tab-content').height( 100 );
Comments
Post a Comment