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.


Flexbox Items affected by hover.

Hi folks, Hopefully someone can help. I have formed a flexbox for my Web pages Header and Navigation menu. I then set up a simple a:hover rule which changes the color and increases the size slightly. The side-effect of this is that the other flex-items move slightly when I hover over either one of them. I can stop this by adding a width to each of the items but then this has the knock-on effect of different spacing between the items. Argh! Any ideas?:) Cheers Dan

2 Answers

I've managed what seems like a bad fix. I altered the position of the elements that were not aligned by giving them a value of 'relative' and moving it accordingly. (A bit makeshift.) Must be a better way:( Cheers:)

Kevin Korte
Kevin Korte
28,109 Points

Can you set up an example of your code as a pen at codepen.io?