@PresidentTree
Posted
Good job on your first Frontend Mentor submission! Here is some feedback...
- Concerning the positioning, there are a few ways to do it. You can format it like Reydel Ocon suggests using
display: grid;
, you can do a similar method usingdisplay: flex;
,justify-content: center;
, andalign-items: center;
which is what I do, or you can make the whole thingposition: absolute;
and use thetransform: translate(-50%, -50%);
method that you found. The reason for the transformation is because you are positioning the element relative to the top-left corner of it, so the -50% (or 50% if you use right and bottom instead of left and top) adjusts it to the actual center. - I would avoid using sizing in pixels since they aren't as responsive. Use rem instead. There are online converters you can use, such as this one.
- While color names are easier, colors could be interpreted differently depending on the device. I would recommend using the colors in HSL format like the challenge gives you or RGB. The same goes for the hexadecimal colors.
- You box-shadow around the payment button should only be on the bottom side. This can be done by changing the 30px to a lower number or increasing 2px.
As for screen responsiveness, what of it are you struggling with? Do you not know how to do it? The best way to do it? I would be happy to help you if you reply.
Marked as helpful
@Mahwash-Aly
Posted
@PresidentTree Thank you for your detailed feedback. I will try to change the solution as you suggested. The issue I am having with responsiveness is that when I view it in mobile view(425px), it loses all the padding on sides. It occupies all the screen width and doesn't leave room for background img to be visible.
@PresidentTree
Posted
@SamiaMahwash The margin (not padding, that's the inside) disappears because there isn't enough space for that screen size. Using percentages for margins also is not the most efficient method.
@Mahwash-Aly
Posted
@PresidentTree Got it! Thank You.