Click to See Complete Forum and Search --> : centering a background image?


warpedmonkey
01-28-2003, 02:15 PM
i have a background image that im using as wallpaper. it is 800x600 and if someones browser is larger it tiles and i dont want that. is there any code out there that can help me out in case someones resolution is larger than the original background..

meow
01-28-2003, 07:46 PM
Centered an not tiling? Sure baby! :p

<style type="text/css">
body {background: #ccc url(pic.jpg) no-repeat center }
</style>

You can do more than that. Please see:
http://www.w3.org/TR/REC-CSS2/colors.html#q2