2 replies [Last post]
jangoux
Offline
newbie
Last seen: 16 years 10 weeks ago
Joined: 2004-08-16
Posts: 4
Points: 0

Hey guys,

I'm new here and i've using CSS for a little while now. Today, i used it for more than styling text, and i found that it could control bg images. The thing is that i am having trouble with a bg image positioning. I dont know if it can be done, but what i need it to be able to move this bg image just like i would with a regular layer or an imagem. With that background-position X Y property, i can just move the bg image sideways, but vertically it wont move. So, can i do this ? Is it possible or should i give up and find another alternative?

Thanks,
ivan

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 27 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Table background image positioning

Yes it is possible. Care to post your code (HTML and CSS, or a link would be better)?

Smile

The next sentence is true. The previous sentence is false. Discuss...

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 30 weeks 6 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Table background image positioning

Try this. It's shorthand so won't work in older browsers, but it's good:

background: url(image.gif) no-repeat fixed 50px 100px #fff;

This will align it top of the page, but 50px down and 100px to the right (I think). The #fff is the colour if the image can't be displayed.

To get it to work in divs in mozzy, use no-repeat scroll.

Verschwindende wrote:
  • CSS doesn't make pies