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! While you're at it, check out some resources Treehouse students have shared here.
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 trialYAWEI SONG
9,168 PointsWhy should we set "top: 0; right: 0; bottom: 0; left: 0" to ".ft-icon-before"?
Why should we set "top: 0; right: 0; bottom: 0; left: 0" to ".ft-icon-before"? If i delete these lines, the icons don't stay in center. But I have set "margin:auto" to center the icons. I don't understand.
Lauri Neuding
13,525 PointsLauri Neuding
13,525 PointsIt's been awhile since I've done this lesson, but top: 0; bottom:0; would insure no default padding would apply and would center it vertically. Left: 0; set it to flush left. If you set it margin: auto, it would center horizontally center it w/o regard to vertical positioning. I imagine the purpose of the former is to maintain consistency across browers relative to the text.