I am trying to stack divs on top of each other, with the lower div shifted to the right. I want the output to look like this
https://i.sstatic.net/eciXT.png
Currently, I have achieved this by using the following code:
<div id="div1" class="checkbox">
<label>
<input type="checkbox" id="chk1" data-bind="checked: data1" />
<span>DIV 1</span>
</label>
</div>
<div id="div2" class="checkbox" style="text-align: center;width: 370px">
<label>
<input type="checkbox" id="chk2" data-bind="checked: data2" />
<span>div2</span>
</label>
</div>
I achieved this by reducing the width of div2 and aligning the text to the center, but I don't think that's the best approach. Is there a better way to do it?