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