[Home]Non-tiled background

HomePage | RecentChanges | Preferences | Newbie Help

HTML Basics

Using CSS, you can set a background image to tile (default), repeat horizontally, vertically, or not at all. In your HEAD, place the following stylesheet:

<style type="text/css">
body { background-repeat: no-repeat; }
</style>

Other values for the background-repeat attribute are..

The background-repeat attribute can also be shortened (along with all other background-foobar attributes) into the background: attribute. For example:

<style type="text/css">
body { background: white url(foo.gif) fixed no-repeat 50% 50%; }
</style>

Gives a white background, with the image foo.gif fixed and centered in the window.


Comments --
HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited December 15, 2002 10:44 am (diff)
Search:

This FAQ is happily hosted by Betadome Digital Media