[thelist] CSS Background image

Ken Snyder ksnyder at coremr.com
Tue May 1 11:34:22 CDT 2007


Matthew Trefz wrote:
> Is it possible to set the position of a background image, and then have the 
> image repeat from that point. I have had success designating a position and 
> having the image repeat horizontally, however if I set the image to repeat 
> vertically or just plain repeat, the background position seems to be over 
> written. Here is the css that I have so far:
>
> body {
>    background-color:#FFFFFF;
>    background-image:url(images/backgroundTexture.jpg);
>    background-position:0px 178px;
>    background-repeat:repeat;
> }
>
>   
It is not possible.  If repeating, the background-position directive 
only controls the point at which the image will start.  If you need the 
background image to start 178px from the top, you'll have to use a 
second container element.  I believe there are some more advanced 
background directives in the CSS spec, but don't expect IE to jump on 
that bandwagon any time soon.

--Ken Snyder



More information about the thelist mailing list