user1036474
user1036474

Reputation: 47

Display Image over another image css

How to display one image over another image in css file

Upvotes: 0

Views: 10762

Answers (4)

Shujaat Kagathra
Shujaat Kagathra

Reputation: 130

This is Works on All Major browsers.. Check this out

<html>
<head>
<style>
.search_customization-icon_icon {
position: relative;
margin-top: -40px;
margin-left: 3px;
width: 162px;
height: 22px;
display: block;
background: url(http://Apparelnbags.com/skins/skin_1/images/anb_icon_sold-with-customization_icon.png) no-repeat center;

}

</style>


</head>

<body>
<table>
<tr>
<td style="padding-right:5px;">

<span style="width:190px;height:235px;display: block;">
<a title="Alternative AA04 Ladies Rib Crew" href="http://www.apparelnbags.com/alternative/aa04-53-oz-rib-crew-t-shirt.htm">
<img src="http://images.apparelnbags.com/product/icon/AA04.jpg" style="position:relative;border:0">
<span class="search_customization-icon_icon">
</span>
</a>
</span>

</td>
</tr>
</table>

</body>
</html>

Upvotes: 0

Steve Adams
Steve Adams

Reputation: 2837

There are several ways, but the key is using positioning (position: relative for example) with z-indexes.

Here is an example.

Upvotes: 0

Manuel
Manuel

Reputation: 10303

You should post some more information, but at the very least take a look at the z-index functionality of css here. That should help a lot if i understand your question right.

Upvotes: 0

David
David

Reputation: 218827

With CSS you can specify the z-index of an element, which will allow you to "stack" elements "on top" of each other when rendering the style to the markup. For example, you can give two elements the exact same position on the page but different z-index values and they would be stacked, one on top of the other.

This is often used in conjunction with the float of an element or with absolute positioning, since traditionally flowing elements generally "push" each other relative to their position rather than absolutely position over each other. Example here. Lots of information here.

Upvotes: 5

Related Questions