I am trying to display several images using div
and span
.
div.graph {
white-space: nowrap;
}
span.graph {
display: inline-block;
}
img.graph {
width: 50%;
height: 50%;
}
<div class="graph">
<span class="graph">
<img class="graph" src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Jsfiddle-logo.png">
<img class="graph" src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Jsfiddle-logo.png">
</span>
</div>
<div class="graph">
<span class="graph">
<img class="graph" src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Jsfiddle-logo.png">
</span>
</div>
The first row of images displays correctly. The second row only has one image and it is smaller than the images in the first row.
How can I change my HTML and CSS so that the image in the second row is the same size as the images in the first row?