Social proof section

Solution retrospective
Hi Front-end Mentor community. Here is my solution for Social-proof-section.
I used grid
to display the website in the desktop version.
But I have some question about it. Should I use the rem
measures for margin, padding, etc, or I'd better use measure like %
or vw
instead.
What is the best to use with grid?
Can you give me some tips about it. Thank you all;
Please log in to post a comment
Log in with GitHubCommunity feedback
- @vanzasetia
Hi, Lo-Deck! 👋
For
margin
andpadding
, I recommend usingrem
. Most of the time, it is better to have a consistent space.You can use fluid space by using viewport units and
clamp()
function. You need to make sure the minimum and the maximum value usingrem
unit. If you use a viewport or percentage unit, the space will keep changing.This tool can help you generate fluid space — Fluid Responsive Design | Utopia
In this case, I think it is better to use
grid-template-areas
. You can divide it into three areas. The first area is the "10,000+ of our users love our products" and the below paragraph. The second area is the ratings. The third area is the testimonials.Also, you may only need four columns instead of 12 columns. For the desktop layout, two columns for the first area and the second area. The testimonials take all four columns.
Here are some suggestions for improvements:
- Simple format: You should write
2rem
instead of2.0rem
. - Unitless
line-height
: Always use unitless numbers forline-height
values to avoid unexpected results. Learn more — line-height - CSS: Cascading Style Sheets | MDN
I hope this helps. Happy coding! 😄
Marked as helpful - Simple format: You should write
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord