lining up images with background image?

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 9
Joined: Sun Oct 02, 2011 5:41 pm

Wed Oct 05, 2011 6:15 pm

I've browsed all over w3 schools (maybe in the wrong area) and I can't seem to figure out how to line up images with a centered background image.

I set an image as the background and it's centered. When I try to add an image and have it line up with the left edge of the background image it jumps all around depending on the browser and resolution. I tried changing it between fixed, relative, etc... but maybe I wasn't doing it correctly.

So basically, how can I line up images with edges of a background image?

User avatar
php-forum Active User
php-forum Active User
Posts: 365
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Thu Dec 29, 2011 9:30 am

You will probably find it difficult to do this with a background image. Why not put the image into a div and set the other image to be positioned relative to it?

Post Reply