css| Skills | Web page
If there are two floats in the container, clear the float by clearing it. When you drag the scroll bar under IE, the outermost border disappears, and if you add width or height to the outermost layer, it will not appear. This is a strange phenomenon and it is not yet possible to explain what causes it. Look at the following example:
<div style= "margin:500px 100px 10px 100px;padding:50px;border:1px solid #ccc line-height:300%" > <div style= Some theories in the process of "float:left" > Web page Standardization <br some theories in the process of/> Web page standardization <br/> Some theories in the process of Web page standardization < Some theories <br/> </div> <div style= "float:right" > Web page Standardization during the standardization of BR/> Web page Some theories in the process of <BR/> Web page standardization process some theoretical <BR/> Web page standardization process of some theories <br/> Web page standardization process of some theories & lt;br/> </div> <div style= "Clear:both" ></div></div>
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]
We can solve this problem through the following methods:
1. Add height:1% to Parent element
2. Add a width
3. Add a background color
Looking at the example below, we'll add a width to the parent element and we're done:
<div style= "width:660px; margin:500px 100px 10px 100px;padding:50px;border:1px solid #ccc line-height:300% "> <div style=" Float:left " ; Some theories in the process of Web page standardization <br some theories in the process of/> Web page standardization <br/> Some theories in the process of Web page Standardization <br/> Web page standardization process Some theories <br/> </div> <div style= "float:right" > Web page Standardization Process <BR Some theories in the process of Web page standardization <br some theories in the process of/> Web page standardization <br/> Some theories <br/> </div> <div style= "Clear:both" ></div></div>
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]