Html/Css - Get image to stretch 100% width of a container then another image over it?
I am struggling with getting the layout of the header i have in mind together.
Here is the html so far:
And the css so far:
<img src="/img/headerBg.jpg" alt="" class="headerBg" />
<a href="/"><img src="/img/logo.png" alt="Logo" class="logo" /></a>
What I am trying to accomplish, is have the image "headerBg.jpg" display to 100% width of the div "header", so essentially it will be the background of the div itself. Then have the image "logo.png" and the div "loginBox" display above "headerBg.jpg".
margin: 5px 5px 0 5px;
border: #0f0f12 outset 2px;
The logo should be floated to the far left end and the loginBox floated to the far right as in the css.
With the image removed, the logo and div are placed correctly, but when the image is introduced they two floated items are placed after the image in the flow.
I have tried various additions and reconfigurations but none have proven to work out how I want them to.
I have added the image in the css as a background to the header div, but it does not stretch 100% that way unless you resort to css3 which i do not want to do although it is exactly what i am trying to achieve.
Would anyone be able to provide some insight on this?
Also any tutorials covering things like this would be a great addition to my collection!