[ACCEPTED]-how reserve height while display is none-css
Instead of putting display: none;
on your div, put visibility: hidden;
. It 1 will be invisible, but still take up space.
Use visibility: hidden
instead of display: none
. Your element won't display, but 3 its dimensions still apply and affect other 2 elements because it's still a part of the 1 page flow.
if you can use visiblity hidden property 4 instead of display:none you can achieve 3 what you want.
When you do visibilty:hidden 2 it just make the elements opacity to 0 while 1 the element is still retaining its space.
Or if you are playing with jQuery fadeIn/fadeOut 3 and need that spot to remain empty but with 2 reserved height, then just wrap around needed 1 element with fixed height, for example:
<div style="height: 52px;">
<img id="loader" src="loader.gif />
</div>
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.