Re: floating background

by "Tim Rivera" <lists(at)timrivera.com>

 Date:  Wed, 12 Mar 2003 18:01:24 -0500
 To:  <hwg-basics(at)hwg.org>,
"Lori Eldridge" <lorrie652(at)icehouse.net>
 References: 
  todo: View Thread, Original
Hello Lori,

> I'm trying to set up a floating background on a site and have that working
but now I need to input a small pixel image so the rest of the background
will be the same color. I have both loaded at this site but pixel background
isn't working and I assume that is because the image is in the script for
the background.
> http://www.hammersmithhillthoroughbreds.com/index2.html


First of all, the BODY element cannot have two background images. If the
browser supports the JavaScript, it will use that background image,
otherwise the browser will use the image given in the HTML with the
'background' attribute.

Secondly, is there a reason why you are using JS to simply write the CSS?

Lastly, what you should do is place a DIV around all the content, and give
that DIV the fixed background image without the background color.


<style type="text/css">
body {background: url(images/graypixel.jpg)}
div.body {background: url(images/raisorfaded5.jpg) no-repeat fixed center
center}
</style>

<body>
<div class="body">

--page content--

</div>
</body>


Tim

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA