to #box-container to see exactly what i want to have in my site.
I know that margin auto does the trick, i noted that in my first post. but i also expected flexbox to work: This is my actual issue: why doesn’t it want to work?
Yes, exactly!
So that’s why i am thinking that for direction=column, the cross axis is a vertical line. and since i want to center everything along that vertical line align items=center would do the trick.
Well, it should have been 90% if everything worked properly. But right now, in testing, i just left it @ 50% so that i can see properly how/if centering works.
Basically i thought that width 90% would give me a nice whitespace around the text, which is not too small, not too large
Yes. You are correct that the direction changes when you use flex-direction: column. So that means the height and width references are also changed, no? Let’s find out. Open up devtools, if you’re using chrome
right click → inspect
click arrow icon on top left of the panel
Then you can hover over elements on the page. Check the margins and padding. If you click on an element while this is activated, it will select the dom node in the panel.
You set the width to 50%, so I assumed you wanted the center top to bottom. But the width does not rotate. In other words, width still goes left ↔ right.
Since you had the width set to 50% and no margin or padding to the left, it centered the container within the left half of the viewport.
If you want the items to center left <->, then you need width: 100%. This is why it worked when you commented it out, because 100% is the default.
This is completely understandable. As long as you’re aware it’s there, you can take your time with. It will prove invaluable for troubleshooting, so I highly recommend getting familiar with it.
For instance, here’s how I knew the width did not rotate. I just learned I could make gifs on my mac
If you right click and open the image in a new tab, you can zoom in better