@JEWebDev
Posted
Hello @Alexandru-Enescu!
Well done! Let me answer your questions:
1. What's the most efficient way to adjust the size of the image?
I think the best way of adjusting the size of an image in this case is to make it full size of the parent element and adjust the parent element instead. like this:
.img{
min-width: 100%
}
in this case you can wrap the image with a header
tag.
2. Do i add margin to each element or use flexbox?
Using flexbox
and gap
will make it easier to make changes in the long run.
Imagine you have 4 components like this and want to change the spacing a bit.
using margin
on each of them you will have to change it on each element of each card. if you use flexbox
you only have to change the gap property of each card container in case they have different spacing.
Happy coding!
Marked as helpful