I've got a horizontal image as a GIF and JPG. It is something I made with Paint--a text logo with an image on a solid background.
I am having a lot of trouble trying to get it to display as a banner/header.
So far, I am only able to get the solid background to show up. The text/logo mysteriously disappears. The solid background extends to the full screen over my background image, and I want that, but obviously, with my text/logo showing up.
This is the code I am using:
<style>
body {
background: url("mybackgroundimage.gif") repeat;
}
#banner {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
width: 100%;
height: 200px;
z-index: -1;
}
</style>
</head>
<body>
<img id="banner" src="mybannerimage.gif" alt="Banner Image"/>
</body>
I think there may be something wrong with my image. I tried this using a different image, and it worked, but my text was stretched.
How do I create a banner with a logo that doesn't stretch when I use this code??
height: 200x;
toheight: 200px;
– Laserleft
andright
along withwidth:100%
is redundant and may produce a conflict. – Shipley