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 trialFlorian Neubauer
5,649 PointsCenter the container?
Hey guys! Can I somehow center the container itself? For my personal page I have an about page that displays an image, a header and a paragraph (displayed as a column with flexbox). When I apply a max-width to my container in order to avoid the paragraph's text expand to much, at a certain browserwidth the container and its items won't be centered to the page anymore.
Best Florian
Nouh Ahmed
7,085 PointsI tried to center the container itself it didn't. I flowed the steps of the video, but i tried to center instead of centering the .item class of the div element.
1 Answer
Alexandr Bessmertnov
Front End Web Development Techdegree Student 16,542 Pointshey there!
if you want to center the parent flex container in another container, then just give it the properties ..to another container display: flex; justify-content: center; align-items: center; as u see everything is simple.
Florian Neubauer
5,649 PointsFlorian Neubauer
5,649 PointsI think that I got the problem.. I didn't see the right margin that was applied to the container.
Best