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 trial

CSS Framework Basics Build a Website with Bootstrap Building the Navbar

Hot Bricks Employee
Hot Bricks Employee
10,991 Points

Can someone explain why the image replacement technique works only when you apply the pull-left class?

Just curious to understand the dependency that pull-left class has with the image replacement technique. When I remove the pull-left class I get strange results that don't make sense.

I'm curious about this as well.
Pull-left is just float:left so not sure how removing it changes the output as much as it does.

1 Answer

Rudolf Janns
Rudolf Janns
5,720 Points

After removing pull-left, try adding display: block; to the .main-logo rule. Looks fine now right?

It seems that floating something also displays it as a block element! Anchors are inline elements by default, so removing the float means it'll ignore the width and height dimensions we specified.