jsFiddle is temporarily not working, but here is what I developed:
HTML
<div class="container"> <h1> <img src="my_img.jpg" /> <span>Here my header!</span> </h1> </div>
CSS
.container { border: 1px solid red; height: 500px; width: 500px; } h1 { background: url(my_header_bg.jpg) top right no-repeat; height: 30px; } h1 img { float: left; } h1 span { background: url(my_header_bg.jpg) top left no-repeat; float: left; line-height: 30px; padding: 0 5px; }
I am shooting a little in the dark here, but I assume you have a heading with text, a background image behind the text, and perhaps the logo on the left? Please let me know if I am wrong.
This might take a little more, but I did to put both the image and the range (with text) in H1 and set the height on h1 to a static height. Thus, the span will always depend on the image, and H1 will increase by 100%. I set the left-aligned background image to span. Then I set the right alignment to H1. If the background image is a seamless pattern of some type, this is likely to work. If this is an image with a static width, you can set the spacing to the width of the background image and extrude it to H1.
If it's just blue, you can just keep the blue background H1.
See if this suits what you are working with.
source share