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
Release: 2016-06-24 11:52:46
Original
1222 people have browsed it

#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>
Copy after login

source:php.cn
Previous article:3D image transition effects implemented using CSS3 animation_html/css_WEB-ITnose Next article:
Typesetting problem_html/css_WEB-ITnose
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template