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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Lili Köves](https://uploads.teamtreehouse.com/production/profile-photos/5954462/micro_a0097787_4ce1c23e6bc62.jpg)
Lili Köves
3,471 PointsFlex container problem - hover effect increases letter-spacing, but that changes width of flex containers. Why?
I am practicing what I learnt about flexbox and transitions. So I have two flex items side by side (<div class="secondary promo"> and <div class="terciary promo"> ), have some text inside both. Applied a transition that on hovering increases the letterspacing of these texts. Weirdly that also increases the width of their parent containers and I can not find out why. What does cause this and how can I solve this so that the parent containers do not change?
Here is a snapshot of my workspace: https://w.trhou.se/brz3htdhlp
Thank you for any tips or comments!
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsThe default for flex-basis
is "auto
".
But if you change it to something else, the containers should not expand:
.supporting > div {
flex-basis: 0;
}
You could also use the shorthand: "flex: 1;
"
![Lili Köves](https://uploads.teamtreehouse.com/production/profile-photos/5954462/micro_a0097787_4ce1c23e6bc62.jpg)
Lili Köves
3,471 PointsThankyou!
Lili Köves
3,471 PointsLili Köves
3,471 PointsIt perfectly worked! Thank you! May I ask what the > means in .supporting > div ? I noticed if that is missing the containers still do expand.
Steven Parker
230,274 PointsSteven Parker
230,274 PointsThe "
>
" symbol is the child combinator. The entire selector targets "DIV elements that are direct children of the element with class supporting".