I want position elements to flow under each other when resizing the window, I have a header that height increases as window get smaller.
have a submenu displayed when click on on element on the menu, the menu will appear under the main menu and it should stick to the bottom of the header when resizing the window.
I try to the problem by detecting screen size by js and change the top dynamically, but it suddenly while resizing the window, the top is different from what it should be and it becomes at the center of the window…
I make simple example here
http://jsfiddle.net/xv8hS/1/
the auto hight is not working on this version! I want the green bar to become under the items bar when resizing the window closer and larger.
This is not a positioning, but a floating issue. Use an empty
<div>withclear:bothin your header (demonstration):See also: