我遇到浮动的UL问题。我已经向左边浮动了几个UL,在我这样做后,他们最终在父div之外。我添加了溢出:隐藏到父div而没有运气。任何帮助将不胜感激。
<div class="competetive_analysis">
<h2> Competetive Analysis</h2>
<h3> Website Keywords</h3>
<p> Tampa, Florida, Apartment Cleaning, Ozone, Apartments, Residents, Clean Sense, Grout Cleaning, Pasco County, Hillsborough County, Pinellas County, Sarasota County</p>
<div class="clean_sense">
<ul>
<li> <strong>Clean Sense</strong></li>
<li>Global Rank: N/A</li>
<li>Bounce Rate: N/A</li>
<li>Daily Time On-Site: N/A</li>
</ul>
</div>
<div class="jan_pro">
<ul>
<li> <em>Jan-Pro</em></li>
<li>Global Rank: 574,373</li>
<li>Bounce Rate: %57.10</li>
<li>Daily Time On-Site: 2:54</li>
</ul>
</div>
<div class="maids">
<ul>
<li> <em>Maids</em></li>
<li>Global Rank: 205,032</li>
<li>Bounce Rate: %56.60</li>
<li>Daily Time On-Site: 1:60</li>
</ul>
</div>
<div class="molly_maids">
<ul>
<li> <em>Molly Maids</em></li>
<li>Global Rank: 124,641</li>
<li>Bounce Rate: %41.50</li>
<li>Daily Time On-Site: 5:44</li>
</ul>
</div>
</div>
ul li{
overflow: hidden;
}
.competitive_analysis{
overflow: hidden;
margin-bottom: 8%;
}
.clean_sense{
float: left;
margin: 0 auto;
width:25%;
}
.jan_pro{
float:left;
margin: 0 auto;
width:25%;
}
.maids{
float:left;
width:25%;
}
.molly_maids{
float:left;
width:25%;
}
答案 0 :(得分:0)
在html“compettive_analysis”中的类名中存在拼写错误(不匹配)与css“competitive_analysis”中的错误(错配)