Previous Message
Next Message

Using background-position and background-repeat together

Sent by Eric A. Meyer on 14 June 2005 19:07


At 6:04 PM +0100 6/14/05, Rachael Beale (CSS-Discuss) wrote:

>When I set the background-repeat on the right-hand border to repeat-y,
>I can no longer seem to control the image's initial vertical position
>(i.e. it starts immediately at the top of the div rather than, say,
>70px down).

    Actually, it starts exactly where you placed it.  It's just that 
repeat-y means exactly that: the image is repeated in both directions 
along the y axis-- in other words, both up AND down.  So from the 
origin placement of '100% 70px' (all the way over to the right, and 
70 px down) the image is repeated.
    The same thing happens with repeat-x, just along the x axis 
instead of the y axis.

>Page:
>http://www.petrucci-ensemble.org.uk/redesign/petrucci-redesign-debug.html
>CSS: http://www.petrucci-ensemble.org.uk/redesign/style-debug.css
>
>Is this a known issue/correct behaviour? And if so, is there a way 
>round it that doesn't involve hacking in additional non-semantic 
>divs?

    That's the correct behavior, given your CSS.  I can't think of a 
solution that doesn't involve adding at least one more div or other 
element.

-- 
Eric A. Meyer (http://meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
   -- Martina Kosloff (http://mako4css.com/)
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: