Home >Web Front-end >HTML Tutorial >Some tips on using float attributes_html/css_WEB-ITnose

Some tips on using float attributes_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 11:52:261321browse

html:<div class="leftdiv"><ul class="link">     <li></li>     <li></li>     <li></li>     <li></li>     <li></li>     <li></li>     <li></li>     <li></li></ul></div>css:.leftdiv{width:260px;}.link  li{    float: left;    margin-right: 4px;    margin-top: 4px;    width:118px;}

Cause: If the containing block is too narrow to accommodate horizontally arranged floating elements, then the other floating blocks move down until there are Space place.

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