There are two divs in my code:
<header id="header">
<div>Hello Vai</div>
</header>
<div id="banner">
<div><img src="http://www.encodedna.com/images/theme/easy-image-resizer.jpg" /></div>
</div>
CSS:
#header {
width: 100%;
background: #f5f5f5;
position: fixed;
z-index: 10;
}
#banner {
background-color: #CCCCCC;
}
When the upper div is fixed, the image div will move closer to it. I want both divs to have auto height based on their inner content and appear one after another.
I haven't found a solution yet despite looking through numerous questions on this topic.