Log in

View Full Version : Image over a Background Image?



cssDude98
03-29-2010, 04:01 AM
Not sure what I'm doing wrong here...

I have one large image, and I want another image being used as a button placed over it. Whatever I'm doing, it seems to push space after the bottom of the big image. Is there any quick and easy sure-fire way to do this. I feel like a big doof right now.

Nile
03-29-2010, 01:25 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it. When you do post your code remember to use [code] tags. That includes [ html ], [ code ], and [ php ].

simcomedia
04-02-2010, 09:00 PM
Just like in physics, two bits of mass can't occupy the same space at the same time. Make the first image a background and the second image can be placed over the top of it and positioned using CSS.

djr33
04-02-2010, 09:15 PM
Alternatively you can use absolute positioning (and/or other things) and use the z-index to raise or lower the "depth" of each image respectively.
It's possible, but can get complex.

Using a background image and then an image object on top makes the most sense if that is possible.

Something else you could consider is using an image map or maybe even slices (chopping an image into smaller chunks so that some can have different properties than others), and in both of those you could set a portion of the image as a link, etc.

If this is just for graphic purposes it might be easier to do this in a graphics program then save the flattened image rather than trying to do it in html.


And of course it things get complex, you can always turn to flash.


So the real question is what your goal is with all of this and then the solution will become clear.