# prevent background image tile



## bella (Jun 18, 2004)

this is such a basic question but I need help... how do you stop the background image from tiling? thanks


----------



## adambyte (Jun 18, 2004)

Control-Click or Right-click your desktop, and choose "Change Desktop Background..." Then, from the menu-widget beside the miniature desktop, choose "Fill screen," "stretch to fill screen," "center," or... uh.... well, I suppose you don't want "tile," so there you go.


----------



## bella (Jun 18, 2004)

Actually I ment when designing websites in dreamweaver. I created a table and inserted a backgroumd image. I would like to keep the background image the fixed size, so it won't tile. Thanks


----------



## TommyWillB (Jun 18, 2004)

lol... I thought you meant your Mac desktop too.

I think there is a CSS way to make the image not tile...  but I ususually do it the low tech way... I just make the image bigger with enough white space to make it not (visibly) tile.


----------



## bella (Jun 19, 2004)

Thanks, I'll give that a try, it's only tiling on small monitors, so that should work.


----------



## mdnky (Jun 19, 2004)

Example css rule to apply:


```
table {
   background: #fff url("images/image.jpg") [color=red]no-repeat[/color] [color=blue]center center[/color]
   }
```

- no-repeat (no tiling), repeat (tile vertically and horizontally), repeat-y (tile vertically), repeat-x (tile horizontally)
- top, bottom, left, right, or center are valid for positioning


You might want to give the table an ID, otherwise that CSS rule will apply to every table in the site. 


```
<table id="norptbg">

----------------------------

#norptbg {
   background: #fff url("images/image.jpg") no-repeat center center
   }
```


----------



## bella (Jun 19, 2004)

cool, thanks!


----------



## TommyWillB (Jun 19, 2004)

There is some similar CSS for page backgrounds vs. table backgrounds... right?


----------



## mdnky (Jun 20, 2004)

The background property in CSS will work with just about any element, even inline elements like P and H1 tags.

Example is the same 500x400 (approx) images set as backgroun to no-repeat, center, center for all tags with a yellow 1px border and background color as pink.  H1, H3, P, and a div (#div).

http://homepage.mac.com/mdnky/test/test.html

---

For some reason my iDisk isn't syncing...so that page might or might not be there, guess it depends on when the thing decides to sync.


----------

