After adding the float attribute to li, the label displayed in li jumps out of the div box. Why is this?
#quyu1 .l .fenlei_menu {
width: 191px;
border- top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #666666;
border-right-color: #666666;
border -bottom-color: #666666;
border-left-color: #666666;
height: auto;
}
#quyu1 .l a {
font -size: 12px;
color: #666666;
}
#quyu1 .l .fenlei_menu h2 {
padding-top: 7px;
padding-left: 18px;
color : #009966;
}
#quyu1 .l .fenlei_menu ul {
padding-left: 18px;
height: auto;
}
#quyu1 .l . fenlei_menu ul li {
width: 48%;
padding-top: 13px;
float: left;
}
#quyu1 . l {
width: 193px;
overflow: hidden;
float: left;
}
Reply to discussion (solution)
google - > Closed floating element
#quyu1 .l .fenlei_menu {
width: 191px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #666666;
border-right-color: #666666;
border-bottom-color: #666666;
border-left-color: #666666;
height: auto;
zoom:1;overflow:auto
}
If it doesn’t work, just use positioning