Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

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!

CSS

.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; }

HTML

<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>

</ul>