How can I arrange divs one over another?
I've tried float
, clear
, all positions but it doesn't work.
img {
float: left;
padding-right: 15px;
}
1 {
position: absolute;
clear: left;
}
2 {
position: absolute;
}
<div id="1">
<img src="//via.placeholder.com/300x300" alt="imagine" width=300 height=300 />
<p>Mos Goriot - Honore de Balzac<br> 10 lei</p><br>
</div>
<div id="1">
<p><img src="//via.placeholder.com/220x300" alt="imagine" width=220 height=300 /> Peter Camenzind - Herman Hesse<br>15 lei</p>
</div>
Here's a screenshot of how it currently looks: