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 trialDavid Reid
19,691 PointsFlex Box Navigation
Hi! I am helping out on a web project! I have recently completed the flex box course and I thought it would be cool to change my bootstrap menu into a flex box menu. I have got it to look how I want at full size but it wraps to two lines just a little too early. Does anyone have any advice
I don't want the logo to shrink in size. I also want the edge of the content to be aligned to the edge of the container. Website is reido.co.uk/netsolv
.flex-wrap {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
}
.site-branding img {
margin-top: 30px;
}
.site-navigation {
margin-left: auto;
}
#site-logo > a > img {
max-width: 60%;
max-height: 60%;
}
1 Answer
Steven Parker
231,269 PointsTo prevent logo shrinkage, specify the dimensions in pixels rather than percent. Also, specify the actual dimension instead of the limit (width
instead of max-width
).
The "container" class has padding. Override the padding and set it to 0 to allow the contents to meet the left edge. You may also have to remove margins from inner elements if you want them completely at the edge.
David Reid
19,691 PointsDavid Reid
19,691 PointsThank Steven. It all worked out :)