How to stack multiple div's horizontally, but also have the option to stack some elements vertical

I’m looking for a solution where I can stack multiple div’s horizontally, but also define a class that stacks the element vertically.

<div class="parent">
	<div class="child">Content 1</div>
	<div class="child">Content 2</div>
	<div class="child horizontal">Content 3</div>
</div>

Illustration:
table