我正在製作新聞通訊,所以我必須製作2列,並使用2個div來做width
的50%。 但問題是,右側的div超出內容。Div以上內容?
我該如何解決這個問題?感謝的
這裏是fiddle
#yellow {
background-color: rgb(214, 196, 0);
width: 100%;
margin-bottom: auto;
}
#yellowL {
float: left;
width: 50%;
}
#yellowR {
position: relative;
float: right;
width: 50%;
}
#h1v2 {
color: rgb(67, 153, 186);
background-color: rgb(214, 196, 0);
}
<div id="yellow">
<h1 id="h1v2">Geschäftsverlauf/Déroulement des affaires</h1>
<div id="yellowL">
<h1 id="h1v2">Offerten</h1>
<p>
</p>
<h1 id="h1v2">Projekte</h1>
<p>
</p>
</div>
<div id="yellowR">
<h1 id="h1v2">Offres</h1>
<h2>Bruit</h2>
<p>
</p>
<h2>Sols</h2>
<p>
</p>
<h2>Déchets</h2>
<p>
</p>
<h2>EIE</h2>
<p>
</p>
<h2>Physique et acoustique du bâtiment</h2>
<p>
</p>
<h1 id="h1v2">Projets</h1>
<h2>Bruit</h2>
<p>
</p>
</div>
</div>
https://jsfiddle.net/v1ktxL36/7/#&togetherjs=dMjuryFAOl – Miguel
編輯問題並加入[MCVE]。不要僅僅鏈接到評論中的第三方代碼。 – Quentin
重點詞**最小** –