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

nicholas maddren
nicholas maddren
12,793 Points

Why isn't my CSS working?

Hello, I am trying to create this effect to my navbar:

http://www.bradhussey.ca/

So if you scroll down you will notice that there is CSS that transforms the logo's size so it pushes the link elements to the left. So I've tried to recreate this effect using a bootstrap affix, I have set an opacity transition which works fine with the affix. The issue is that I can't get the logo to go from 0 to 2.1em it just leaves me with a strange squashed logo. I have not yet added a transition I just want the logo to change size when the affix triggers.

Here is an example of my live header:

http://www.dealerbyte.co.uk

Any help on this would be really appreciated!

1 Answer

I played around a bit, and changed the max-width on your logo img to 8.1em, and set the height to 'auto'. You might need to play around with the margins a bit more but this should give you an appropriately sized logo appearing.