Foundations Flexbox exercises: Add alternative centering solution using `margin: auto` in `01-flex-center`
Complete the following REQUIRED checkboxes:
- [ x] I have thoroughly read and understand The Odin Project Contributing Guide
- [ x] The title of this issue follows the
location for request: brief description of requestformat, e.g.Foundations exercises: Add exercise for XYZ
The following checkbox is OPTIONAL:
- [ x] I would like to be assigned this issue to work on it
1. Description of the Feature Request: In foundation/flex box section we learned two ways to center the div:
- Through alignment and
- through
margin: autoon child elements when parent havedisplay:flex;applied to it
However, the official solution for the 01-flex-center only demonstrate the alignment based approach.
I would like to purpose adding alternative solution margin:auto in form of comment within solution file.
This will help learners understand that there are multiple ways to achieve perfect centering with Flexbox.
2. Acceptance Criteria:
3. Additional Information:
This suggestion is intended to improve clarity and encourage flexible problem-solving by exposing learners to multiple valid approaches.
Thanks for the suggestion. We generally don't go down the whole of showcasing multiple solutions in most cases, as that often leads to "how about this one too? And that one?" etc.
That aside, I'm turning this one down because it's counter to the intent of that exercise which is to only use flexbox features, which excludes margin. The purpose is less to end up with a centred element and more to understand how certain flexbox features work (like justify/align).