Sry for the bad title, I couldn't come up with something more descriptive...
I have four types of content, each one in a separate div like this:
<div id="item1">
some content
</div>
<div id="item2">
some content
</div>
<div id="item3">
some content
</div>
<div id="item4">
some content
</div>
I want to place them so #item1 & #item2 sits next to each other on the first row and #item3 & #item4 next to each other on the second row (forming a square together).
I know how to do this with floats:
#item1, #item3 {
float: right;
}
but our teacher want's us to use "display: inline-block" for this website. I've tried to find and answer but the only thing I could come up with was to put the items in sets of two:
<div id="content1">
<div id="item1">
some content
</div>
<div id="item2">
some content
</div>
</div>
<div id="content2">
<div id="item3">
some content
</div>
<div id="item4">
some content
</div>
</div>
#item1, #item2 {
display: inline-block;
}
#item3, #item4 {
display: inline-block;
}
And that's not an option since I need to be able to move elements individually by using media queries :/ for example float #item1 in a separate direction on the homepage while #item2 moves elsewhere, I hope you understand what I mean.
EDIT To clearify I want "lemon" to be right under "apple": https://jsfiddle.net/1hj3L018/1/