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 make #_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:52:461236browse

#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


Reply to the discussion (solution)

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>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn