Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Rachel Miller
Rachel Miller
4,804 Points

Why can't I get the the icons to center using flexbox?

Here is the code. The icons are right aligned for some reason. Any suggestions? Thanks!


.flex-social { display: -webkit-flex; display: flex; -webkit-flex-direction: row flex-direction: row; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-around; justify-content: space-around; list-style: none;


.social-item img{ padding-bottom: 3em; width: 3em; height: 3em; }


<ul div class="flex-social">

<li class="social-item"><a href="http://twitter.com/RachelWebDev"><img src="img/twitter.svg" alt="Twitter Logo" class="social-icon"></a></li>

<li class="social-item"><a href="http://github.com/millerrach"><img src="img/github.svg" alt="Github Logo" class="social-icon"></a></li>

<li class="social-item"><a href="http://www.linkedin.com/in/rachelwebdev"><img src="img/linkedin.svg" alt="linkedin Logo" class="social-icon"></a></li>