My goal is to create two responsive columns of divs that stack on top of each other as the screen size decreases. The challenge I am facing is getting these divs to always be centered and sit next to each other, using only inline CSS.
<div id="container" style="width: 100%; margin: 0 auto;">
<div class="block" style="float: left; width:50%;">left div</div>
<div class="block" style="float: left; width:50%;">right div</div>
<div class="block" style="float: left; width:50%;">left div</div>
<div class="block" style="float: left; width:50%;">right div</div>
<div class="block" style="float: left; width:50%;">left div</div>
<div class="block" style="float: left; width:50%;">right div</div>
</div>
I have attempted adjusting the widths of the left and right divs to 42% so they appear next to each other, but this causes them to be compressed when viewed on smaller devices. I want them to expand to full width when they collapse into a single column on mobile devices.