CSS - repeat to the right only, possible?

Associate
Joined
6 Jan 2006
Posts
1,024
Location
Midlands
Ive got a div and a background image which i want to repeat to the right only from the starting position.

Is this possible?
 
that will repeat left and right from the starting position.

i need to repeat to the right only.
 
Background images are put in place from the top left corner, so I'm not quite sure what you're using to limit the left hand edge? The easy solution would be to have an offset table or div for the layout, and apply the background to that.
 
You can change the background-position property to set where the background starts tiling from, but as said, this won't fix your problem.
 
Probably best to post what you're actually trying to achieve, because there's probably another way to go about it.
 
i want to remove the right hand side of the red

http://i55.tinypic.com/2urur7p.gif

at the moment its background-repeat:repeat-x;

You would have to do something clever with layered elements underneath the main 'logo' container.

Or you could make a 1px high but super-wide gif (maybe 4000-odd pixels wide, enough to be wider than the widest monitor) and fill that red on the left 50% of pixels and transparent on the right 50% of pixels.

Then set that to background-position: center; background-repeat: repeat-y; on a container behind the logo container.
 
Back
Top Bottom