I've been trying to group together certain divs and a div with image inside but the div with the image keeps pushing all other divs that are supposed to be in the same line to the next line.
-> This looked similar to what empty divs do without an " " inside so I tried this and didn't work
-> this is exactly similar but none of them worked
Any other stuff that's left that I can try and make this work?
Here's my code:
body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
div {
display: inline-block;
box-sizing: border-box;
margin: 1px;
background: red;
border: 10px purple dashed;
width: 33%;
height: 300px;
font-size: 100px;
}
img {
max-height: 100%;
max-width: 100%;
}
<div class="Somename">h</div>
<div class="Somename"> </div>
<div class="Somename">h</div>
<div class="Somename"> </div>
<div class="Somename"><img src="https://placekitten.com/1920/1080" alt=""></div>
<div class="Somename">h</div>
What this renders in the browser is this