Yamaha32088
Yamaha32088

Reputation: 4163

Floating second li element

If I have the following

<ul class="Tabs_control">
    <li class="boom">
    <li class="boom">
</ul>

How can I float the second li element to the left?

Upvotes: 0

Views: 55

Answers (2)

Amarnath Balasubramanian
Amarnath Balasubramanian

Reputation: 9460

Html

 <ul class="Tabs_control">
        <li class="boom"> Item 1 </li>
            <li class="boom">Item 2 </li>
</ul>

CSS

.boom {
    display:inline;
    float:left;
    padding:10px;
}

Working Fiddle

Upvotes: 1

MarcinJuraszek
MarcinJuraszek

Reputation: 125630

nth-child(2) should do the trick:

.Tabs_control li.boom:nth-child(2) {
    float: left;
}

Upvotes: 1

Related Questions