以下 (クラス ".span-tag" を持つ 5 つの要素ごと) を IE 7/8 と互換性を持たせたい
.taggar .row-fluid .span-tag:nth-child(5n),
margin-left: 0;
}
私は次のことを試しましたが、うまくいかないので、おそらく間違っています:
.taggar .row-fluid .span-tag:first-child + .span-tag .span-tag .span-tag .span-tag {
margin-left: 0;
}
html:
<div class="action-container container taggar">
<div class="row-fluid">
<div class="span3 span-tag">
<a href="#"><div class="tag label btn-tag tags"><span>foo1</span></div><span class="votes">x 61</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo2</span></div><span class="votes">x 52</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo3</span></div><span class="votes">x 387</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo4</span></div><span class="votes">x 343</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo5</span></div><span class="votes">x 434</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo6</span></div><span class="votes">x 4</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo7</span></div><span class="votes">x 134</span></a>
</div>
<div class="span3 span-tag">
<a href=""><div class="tag label btn-tag tags"><span>foo8</span></div><span class="votes">x 32</span></a>
</div>
</div>
</div>