Positioning background image (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


BeTheBall -> Positioning background image (3/20/2007 7:01:30)

Hi all, I'm back again. I have the following css for a background image:

background-image:url(../images/stop.gif);
background-attachment:fixed;
background-position:left;
background-repeat:no-repeat;

How do I adjust it so the image is say 10px from the left edge rather than right on it?




jaybee -> RE: Positioning background image (3/20/2007 7:07:17)

background-position:10px 0px;

You'll need to play around with the numbers, they never seem to end up exactly where I want them.




BeTheBall -> RE: Positioning background image (3/20/2007 7:15:47)

Thanks Jaybee. I should have been able to figure that one out. Of course, it is 6:00 AM here.




jaybee -> RE: Positioning background image (3/20/2007 9:00:04)

No probs Duane. I had a hiatus yesterday at 11.20pm when I couldn't for the life of me figure out why a background kept repeating when I told it not to. Helps no end of course if you use no-repeat instead of repeat-none.

I love the consistency of css. [&:]




Tailslide -> RE: Positioning background image (3/20/2007 9:58:10)

I'm always doing that!

Is it...

border:none, border:0, border:no thanks, border:*shrug*




jaybee -> RE: Positioning background image (3/20/2007 11:21:50)

[:D]

It's the shorthands that always get me. I gaily go adding everything into the line, including the kitchen sink, and then get it all chucked out.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125