mardi 14 juin 2016

How to put a image below another?

I know their are a lot of similar questions, but non of those fixed my problem. How to put a image below another with x px gap? This is my code

html

<img src="images/2.jpg" style="position:absolute;">
<img src="images/1.png"  style="position:absolute;">

CSS

img {
top: 50%;
left: 50%;
max-width: 480px;
width: 100%;
height: auto;
transform: translate(-50%, -50%);
display: block; 

}

Edit: this is my problem https://jsfiddle.net/50crfe10/ As you can see, their are 2 images, but only 1 appear. because one is above another.

Aucun commentaire:

Enregistrer un commentaire