Here are my two div elements:
<div class='container'>
<div class='left'></div>
<div class='centered'></div>
</div>
I am looking to center the second inner div and have the first inner div positioned on the left side of the centered one. However, I do not want the left div to stick directly to the left side of the screen using float:left
. Instead, I would like it to be aligned with the left side of the centered div.
I prefer using flexbox for layout purposes, but I am open to other solutions that do not involve JavaScript and are CSS-only.