@Atatra
Posted
Well done on finishing it so fast! Your retrospective was fun to read.😄
I don't think it's a bad idea to take more time on stuff you're not acquainted with though. I started this journey with little knowledge of CSS & HTML, and it took me waaaay too long to accomplish my first challenge (well, it still takes me too much time... haha). The reason being I googled every single thing I didn't know. Of course if you're stuck on something for too long, it's better to move on and do what you know, then come back. Just like you did! So it's not a bad thing to do. :)
For shadows I recommend looking at examples, this is a good start. Search for ones that look close enough to your desired shadow, then tweak it as you please.
What helped me get of clearer view of how flexboxes work is Flexbox Froggy. It's fun to play and it is quite helpful. When I did the QR Code Component, my thought process was:
- I need to make the card sits exactly at the middle of the page.
- For that, my component that will contain the card must take 100% of my viewport's height. (Body or main in this case). One way is with
min-height: 100vh
(width: 100%
for width). - Now that my parent component fits the entire height. I can center all its children vertically (it didn't work as expected before, bc my body's height was the height of all its children!) + horizontally. Just as you did, I used
display: flex
. justify-content: center
to align its children along the main-axis (here it is the x-axis because flex-direction is set torow
by default).align-items: center
to align its child along the other axis.
At each step, I inspect element
my webpage to look at the boxes of each element.. So I know what I'm doing. It helps visualize stuff and realize that every elements are just little boxes with margins & paddings put inside/alongside one another.
Hope my comment will be useful to you. I may have made some mistakes, so feel free to google it & experiment it on another challenges ! 😁
Marked as helpful