jbrintnell
09-18-2011, 10:06 PM
Hello all. I'm attempting to center a background behind text. I got it so it works on my monitor, but when I resize my screen, the image goes off to the right. I need the image to stay centered on the screen, behind H1 and H2.
Here is my code.
<h1>Electronic Solutions</h1>
<div style= "position:fixed;
left:425px;
top:10px;
z-index:-1;">
<IMG SRC="images/banner.jpg" ALT="Banner" height="200" width="850">
</div>
<h2>Serving all your telecommunication needs</h2>
all I want is the banner to stay behind the headings. I haven't tried floating it but was concerned because I am placing it behind text whether that would work correctly.
My website is www.myelectronicsolutions.com (http://www.myelectronicsolutions.com) which I know isn't compliant with W3 standards, nor are the colors and such correct at the moment.
Here is my code.
<h1>Electronic Solutions</h1>
<div style= "position:fixed;
left:425px;
top:10px;
z-index:-1;">
<IMG SRC="images/banner.jpg" ALT="Banner" height="200" width="850">
</div>
<h2>Serving all your telecommunication needs</h2>
all I want is the banner to stay behind the headings. I haven't tried floating it but was concerned because I am placing it behind text whether that would work correctly.
My website is www.myelectronicsolutions.com (http://www.myelectronicsolutions.com) which I know isn't compliant with W3 standards, nor are the colors and such correct at the moment.