Home > Web Front-end > HTML Tutorial > Rookie shouts for help!_html/css_WEB-ITnose

Rookie shouts for help!_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:50
Original
1184 people have browsed it

[img=http://cm.qzs.qq.com/qzone/photo/zone/new/photoNewView.html#aid=V13enn621fH0VC&lloc=NDFi5.LOECe*p0.YmwoNF0dxOrNhAAA!][/img]
As shown in the picture: The red line is a div1
floating to the right [img=http://b96.photo.store.qq.com/psb?/V13enn621fH0VC/jWBrKPD0zwVHN0NVgI.ONb0rZh0hsVKfTmrR61DcR6A!/b/YRokQzlbdwAAYkeUPjk7dwAA][/im g]
As shown in the picture: the red circle is div2 nested in div1 floating to the left
[img=http://b95.photo.store.qq.com/psb?/V13enn621fH0VC/FQkuMAg2ng.PgeVFZtGI* PY1PRHfWWADKBySggL1hgo!/b/YT2Qqjj8dQAAYkwnrzjkdgAA][/img]

As shown in the picture: the space in the red circle is generated. How to clear the excess space?
This is the simplified code:

html:



="div2">

                                        🎜> css:
.div1{float:right;}
.div2{float:left;}


.div2
{
float:left;
margin:0;

padding:0;

}
I mean a float There are multiple floating small blocks nested in the block

If these small blocks are the same height as the parent block, then they will definitely move downward and overflow the parent block.


I want to know How to prevent the small block from overflowing the parent block

The original poster used html css to present the problem.

All the pictures are down = =

Related labels:
source:php.cn
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