我在使用我網站的產品頁面工具欄上的一個小功能時遇到問題。我想讓它浮動到我的網站的麪包屑導航的右側,使其與麪包屑導航內聯。但它會進入下一行。如何讓無序列表向右浮動?
這裏是什麼樣子:
<div id="breadcrumbsForStore">
<h5>
<a href="/" title="store home">Home</a>
{% for category in product.categories limit:1 %}/{{ category | link_to }}{% endfor %}/
<a href="{{ page.full_url }}" title="{{ page.name }}">{{ page.name }}</a>
</h5>
<ul id="shoptools"><li>SIZE GUIDE/Filter:</li></ul>
</div>
而這裏的CSS:
#breadcrumbsForStore{width:960px; font-family: futura; text-align:left;margin:20px 0px 25px 0;padding:0px 0 5px 0;clear:both; margin-left: auto; margin-right: auto; text-transform:uppercase;}
#breadcrumbsForStore h5{font-size:10px; font-family: futura;}
#breadcrumbsForStore h5 a{color:#525252; border-bottom:0px dotted #0d0d0d; letter-spacing:1px; padding: 10px 3px 10px 3px;}
#breadcrumbsForStore h5 a:hover{color: #0d0d0d;}
ul#shoptools{float:right; display:inline;}
ul#shoptools li{float:left; display:inline;}
這裏的問題出在哪裏(它說: 「SIZE GUIDE/FILTER:」) http://shopmoonfall.bigcartel.com/products
把'UL#shoptools'爲#breadcrumbsForStore'元素'的第一個孩子,鏈接之前。不要忘記清除'#breadcrumbsForStore'結尾處的* float *。 –