No need to feel silly. We are here to learn and mistakes only make us better.
I’m not sure if the # characters in your example are meant to be placeholders for numbers or literal characters (#fr
isn’t a valid unit itself). A good solution for this exercise would be:
display: grid;
grid-template-columns: 3fr 1fr;
grid-gap: 20px;
fr
stands for a fraction of the remaining space. This would divide <main>
into three quarters for <article>
and one quarter for <aside>
. An advantage of this over your flex code is that <aside>
gets wider when there is more space available.
Exactly. I like to point out such small things when there aren’t any big mistakes. It may give ideas/perspectives for learners who already are on a good level like you are.
Michael