You have no idea how cute it sounds and looks, when you see someone else trying to learn new things and experiencing similiar stuff.
Here are some advices from me:
-Box shadow thing, I think what they did was they used either filter: box-shadow()
or box-shadow
with higher number of spread that gives this a bit blurred and scattered shadow.
Honestly, I would say that using flexbox often isn't a bad thing. It's probably the easiest and most consistent way to layout your elements. Maybe in larger projects it might increase loading time.
Media queries, my answer might be a bit controversial, but the best way to use media queries is not to use them. We have many other ways to create a responsive, good looking layout without them. For layouts grid, flexbox, for sizes we have calc functions, clamps which are awesome to use if you get a grasp on them, and media queries for me personally just add not wanted complexity to everything you apply them to. Only use media queries when it's necessary. When I used media queries depending on how large project it is I kept them in the same file as css/sass.
Few informations about positions: When you move element with relative position it doesn't fill the gap that you left after moving the element. When you move element with absolute position it stays relative to it's parent, so for ex. if you have a position relative div.main that contains another div.pos-abs with position absolute and you change the margin of div.pos-abs it will move around inside div.main not affecting other elements inside div.main. (If you don't have position relative in div.main, div.pos-abs will be relative to body/document).
Here you can use few solutions:
To keep the elements from overflowing you can prevent it by closing other elements that are opened, by clicking on a new one (I would say that's more a workaround rather than a solution).
You can add to the whole card a min-height: val
, it will make sure that it won't overflow, because it will expand the card itself when it notices that the elements are about to overflow.
I think the actual answer to that would be to find a way that doesn't affect layout so that there is no layout shifting, 1st solution would do that if you will use max-height
or height
.
I hope I might have somehow helped you.