Question : div variable height and jscript

Hi X-perts,

It is, probably quite complicated question... Here is my div structure:



.......some stuff...
........


.....some stuff





Upon loading the page, I move the div with id="mover" 290px up with jquery. It leaves too large space before div if="footer". So, I move this div up as well, but it leaves a space below div ''footer'.

My question: can I define the wrapper div so that there is no overflow, if some internal divs move dynamically up? I could play with the height of the wrapper via jquery as well, but would rather try to find some simple solution.

Any ideas?


Thanks

A

Answer : div variable height and jscript

If you don't set a height in the wrapper and perhaps add the class clearfix to it (attaching the classes) it will follow the pageflow as long as divs inside are cleared and/or floated correctly.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
/* Clearfix style - START - Forces Firefox to expand divs when content is bigger than initial height. Must be applied as a class to the divs needing it */
.clearfix:after{
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility:hidden;
}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* Clearfix style - END */
Open in New Window Select All
Random Solutions  
 
programming4us programming4us