Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Playing with Flexbox, aligning list items Reply To: Playing with Flexbox, aligning list items

#283396
drone4four
Participant

Thank you @Beverleyh: Your Pen accomplishes what I set out to achieve.

Thank you @Paulie_D: You are right that CSS Grid is ideal for this situation. I’ll use your grid code for my project. With my prior novice experience I conflated flexbox and grid. The distinction is clear now.

One last thing, Paulie_D: In your Pen, the distance between the boundary of the browser window and box 1 is longer than the distance between the boundary of the browser window and box 5. How would you make these gaps equal on either side of the flex-container element of the HTML? I tried adding margin: 0 auto; to the CSS block for this element but this does not center align flex-container. What would you recommend to fix this?

By the way Paulie_D: How do you get CodePen to integrate like the way you do? Rather than sharing an https:// hyperlink, forum members can play with the Pen on the forum. How do you do this?