body{width:400px;}
.bd{ padding:0 50px 0 80px; height:100px; }
.middle{ float:left; width:100%; height:80px;background:blue; }
.left{ float:left; width:180px; height:80px;background:#0c9;margin-left:-320px;}
<div class="bd">
<div class="middle">middle</div>
<div class="left">left</div>
</div>
The calculation for the 100% width of bd1 is (400-50-80)=270px
, and adding 50 gives us a total of 270+50=320px
, which is why we have
-calc(100% + 50px)=-320px
.
The question arises as to why margin-left:-320px;
cannot be modified to margin-left:-calc(100% + 50px);
?