I have a header (dynamic height) with a fixed position.
I need to place the container div right below the header. As the header height is dynamic, I can\'t use the
Well! As I saw my question now, I realized that I didn't want to mention fixed margin value because of the dynamic height of header.
Here is what I have been using for such scenarios.
Calculate the header height using jQuery and apply that as a top margin value.
var divHeight = $('#header-wrap').height();
$('#container').css('margin-top', divHeight+'px');
Demo