Home >Web Front-end >HTML Tutorial >#d1{folat:left} and #d2{folat:right; wdth:300px;} how to make #_html/css_WEB-ITnose
#d1{folat:left} and #d2{folat:right; wdth:300px;} How to let #d1 take the remaining width of the display area?
For example, if my screen is 1024*768, then the width of d1 should be 724. How to obtain this?
Ask for advice
Is there any front-end expert who can help me? I’m urgent. Thank you
<div style="width:300px;height:100px;background:#ccc;"> <div style="width:calc(100% - 100px);height:100px;float:left;background:#f00;"></div> <div style="width:100px;height:100px;float:right;background:#0f0;"></div> </div>