如何在我添加 display:block 的其他元素旁边显示元素?
我添加了显示块以使其显示在新行上。
HTML
<nav><ul class="nav">
<li class="nav" id="help1"><a href="default.asp">Home</a></li>
<li class="nav" id="acom"><a href="news.asp">Accommodation</a></li>
<li class="nav"><a href="contact.asp">Crieff</a></li>
<li class="nav" id="clear"><a href="about.asp">Holiday Activities</a></li>
<li class="nav" id="help"><a href="about.asp">Attractions</a></li>
<li class="nav" id="acomm"><a href="about.asp">Prices</a></li>
<li class="nav"><a href="about.asp">Location</a></li>
<li class="nav" style="border-right: none; padding-right: 0; margin-right: 0;"><a href="about.asp">Enquiries / Availabili</a></li>
</ul></nav>
CSS
#help {
color: red;
width: 90px;
display: block;
clear: both;
}
#acomm {
display: inline-block;
}
我有一个jsfiddle: