javascript - How to adjust asp placeholder size according to content -



javascript - How to adjust asp placeholder size according to content -

i have placeholder holds few elements, 1 of them tgl div, clicking on opentime button tgl div visible or hidden. problem placeholder opentime size static, when tgl visibility hidden, placeholder takes unnecessary space. possible alter placeholder size according content ? must utilize placeholder.

//html

<asp:placeholder runat="server" id="opentime" > <input type="button" id="open" onclick="togglediv()" value="edit time" style="width:130px"/> <div id="tgl" style="visibility:hidden;overflow:hidden;min-height:1px"> <div id="majindiv" style="width: 600px"; ></div> </div><br />

use display: none; css instead of visibility:hidden;

display: block; show element back.

visibility controls visibility space still preserved. display:none clears space if element not there.

javascript html css asp.net placeholder

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -