I’m trying to work out if it’s possible to use a fluid background image using ‘img’ for a header, whilst keeping the menu and page contents directly beneath it inline with the fluid resizing.
The CSS is:
img#header-wrapper {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index:10;
}
#content-wrapper {padding-top:266px;float:left;overflow: hidden;border-bottom: 0;position: relative;background-color:white;height: 100%;}
The html:
<div id="header-wrapper" class="clearfix">
<img id="header-wrapper" src="/images/new-header.jpg" alt="" />
</div>
</div>
You’ve made this loads more complicated than it needs to be with absolute positioning. All you need is
height: autoon the image.LIVE DEMO >