sibas
sibas

Reputation: 23

Html List: From vertical to horizontal

I have a social class provided by my WordPress theme as follows, and its placed vertically:

<div class="social">
    <ul>
        <li><a href="#"><i class="ti-facebook"></i></a></li>
        <li><a href="#"><i class="ti-twitter-alt"></i></a></li>
        <li><a href="#"><i class="ti-linkedin"></i></a></li>
        <li><a href="#"><i class="ti-pinterest"></i></a></li>
    </ul>
</div>

Iam trying to place this list in a horizontal line

display: inline!important;

But im stuck. Does anyone have an idea?

Upvotes: 2

Views: 208

Answers (2)

Bhautik
Bhautik

Reputation: 11282

Try below CSS.

.social ul li{ display:inline-block; }
<div class="social">
    <ul>
        <li><a href="#">facebook<i class="ti-facebook"></i></a></li>
        <li><a href="#">twitter<i class="ti-twitter-alt"></i></a></li>
        <li><a href="#">linkedin<i class="ti-linkedin"></i></a></li>
        <li><a href="#">pinterest<i class="ti-pinterest"></i></a></li>
    </ul>
</div>

Upvotes: 1

sfy
sfy

Reputation: 3228

try this:

.social ul {
  display: flex;
  flex-flow: row nowrap;
}

Upvotes: 0

Related Questions