我正在尝试将中间列表项浮动。所以带有职位的红色项目应该出现在蓝色项目旁边。但是当我将它向右浮动时,它会将它放在蓝色的右侧而不是左侧。
所以这就是我现在所拥有的
当我正确浮动时,我明白了。
那么我现在怎样才能正确显示它呢?
我的 SCSS
.credit-list-main{
list-style:none;
padding:0;
font-size:13px;
>li.credit-list-company{
list-style:none;
>h3{
font-weight:bold;
font-size:13px;
}
>ul.credit-list-person{
list-style:none;
padding:0;
padding-left:5px;
>li{
display:inline;
}
/*Person name*/
>li:nth-child(1){
background:green;
}
/*Job title*/
>li:nth-child(2){
background:red;
float:right;
}
/*Person nav*/
>li:nth-child(3){
background:blue;
float:right;
}
}
}
}
HTML
<ul class="credit-list-main">
<li class="credit-list-company">
<h3>Management</h3>
<ul class="credit-list-person">
<li>Cevat Yerli</li>
<li>CEO & President</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Avni Yerli</li>
<li>Managing Director</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Faruk Yerli</li>
<li>Managing Director</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
</li>
<li class="credit-list-company">
<h3>Programming Team</h3>
<ul class="credit-list-person">
<li>Filipe Amim</li>
<li>Game Programmer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Sandy Brand</li>
<li>Senior AI / Game Programmer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Dean Claassen</li>
<li>Senior Interface Programmer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Fernando Colomer</li>
<li>Senior Game Programmer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Sandy Brand</li>
<li>Senior AI / Game Programmer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
</li>
<li class="credit-list-company">
<h3>Research & Development</h3>
<ul class="credit-list-person">
<li>Christopher Balte</li>
<li>Software Engineer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Iva Zoltan Frey</li>
<li>Lead Animation Engineer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Iva Herzeg</li>
<li>Lead Animation Engineer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
<ul class="credit-list-person">
<li>Christopher Balte</li>
<li>Software Engineer</li>
<li><a href="#"><i class="icon-edit"></i></a></li>
</ul>
</li>
</ul>