ラララル、私は CSS で気が狂いそうです...
ここでは最も単純なレイアウトを実現できません。何かが壊れています。隣り合った2つの列が必要です:
[**** 300px ****][******** 500 px ********]
2nd column heading
Some text.. - 1st bullet point text
- 2nd bullet...
- 3rd...
-------------------------
私はこれらのdivを持っています:
<div class="faq_item">
<div class="faq_link">
<a href="">Video/screenshot coming soon.. </a>
</div>
<div>
<strong>Q: How to add an item to a group? </strong>
<ul>
<li> Place your finger on one of the four icons at the bottom toolbar.</li>
<li> Move your finger with the icon to drag it to the group to which you wish to add the item.</li>
<li> Release your finger.</li>
<li> Enter the price, adjust the quantity if needed, and press the 'return' button.</li>
</ul>
</div>
<hr/>
</div>
そしてCSS:
.faq_item strong {
display:block;
margin-bottom: 10px;
}
.faq_item span {
display: block;
}
.faq_item {
margin:0 0 30px 50px;
}
.faq_item div {
display:inline-block;
}
.faq_link {
width:300px;
}
div.faq_item hr {
width:500px;
float:right;
clear:left;
}
私の問題は、コードが現在あるときに、内部の最初の div が 2 番目の div の上にあることです。最長の「li」タグを削除すると、div 全体が適切に配置されます (内部の 2 つの div が隣り合っています)。通常のように「li」ラップしない理由がわかりません.2つのdivをインラインブロックとして、それらは互いに隣り合っており、垂直に積み重ねられていません。
お知らせ下さい。ありがとうございました!