[thelist] background img not tiled
Tommy Martin
tommy at vertebrate.co.uk
Thu Mar 1 08:11:42 CST 2001
Cristi wrote:
>Is there a way to have a background image, smaller than the browser window,
>that remains untiled ? (left alone in the upper left corner; no matter if
>bad looking)
Hi Christi,
I use CSS to achieve this; seems to be happy across most browsers.
This goes in the head of the document:
<style type="text/css">
<!--
body { background-attachment: scrolling; background-repeat:
no-repeat; background-image: url(images/background.jpg)}
//-->
</style>
"images/background.jpg" is the root and file name of the image you want to use.
"background-attachment: scrolling" can also be
"background-attachment: fixed" which has the occasionally useful
effect of preventing the bg image from scrolling with the rest of the
page (at least in IE; NN 4x just seems to ignore this one).
Dreamweaver can write this stuff for you if you use the CSS editor to
redefine the <body> tag. Not sure about other WYSIWYGs, but assume
they must have something familiar.
Cheers
Tommy
(list newbie, ex-lurker)
--
V e r t e b r a t e . co . uk
design with a spine
http://www.vertebrate.co.uk
More information about the thelist
mailing list