English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a background that is centered in the page via CSS that has edges that have some opacity that I want tiled as the page gets longer. It needs to be tiled as well.

2007-10-29 05:44:25 · 1 answers · asked by Jamaal E 3 in Computers & Internet Programming & Design

1 answers

Tiles are actually "repeats" in css so

body { background: #fff url(yourimage.png) repeat;
}
Will repeat both vertical and horizontal

body { background: #fff url(yourimage.png) repeat-y;
}
Will repeat Verticle

body { background: #fff url(yourimage.png) repeat-x;
}
will repeat Horizontally

body { background: #fff url(yourimage.png) no-repeat bottom right;
}
Will cause only ONE copy to appear at the bottom right of the page..

And if you just want the edges of an image repeated. You will need a second image with just the edges shown then repeat it vertically. You can use a "container element" or some other wrapper to cause that behavior.

Oh and if you need the ALPHA support
http://www.twinhelix.com/css/iepngfix/demo/
http://bjorkoy.com/past/2007/4/8/the_easiest_way_to_png/
and last but not least
http://www.alistapart.com/articles/pngopacity

Best to use gifs just convert the png if you really want transparency in the background!

2007-10-29 06:27:36 · answer #1 · answered by Tracy L 7 · 0 0

fedest.com, questions and answers