View Full Version : background position in CSS
12-30-2003, 10:29 PM
I would like the image to begin repeating 100px from the top of the containg block. Here is what I'm using.
background: URL(images/imagename.png) transparent 0 100px repeat;
Which is not preforming how I expected it to, instead it corners the image at that point 100px down, but still repeats it throughout the entire element.
How would I go about getting the results I desire? Or am I just dreaming?
12-31-2003, 12:26 AM
It sounds like the initial position of the graphic is correct, correct? And you're telling it to repeat, which is what it's doing. How else did you want it to repeat?
12-31-2003, 12:34 AM
I would like the top 100px of the element to remain transparent, and the repeating image to begin repeating after.
12-31-2003, 12:56 AM
you may have to just make the 100px transparent in some graphic editing program.
12-31-2003, 01:04 AM
Its not that i can't make the image transparent. I could do that, but then as the element changed in height, the background would have a stripped look to it.
12-31-2003, 01:06 AM
Yeah, sorry. If you set it to repeat, it will repeat all-around. You might try nesting an absolutely positioned element inside it, and apply the background image to that.
12-31-2003, 01:55 AM
Ya, I was trying to avoid putting an extra element in there. Just had to make sure I wasn't missing somthing.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.