Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Social Proof Section with HTML, CSS and Responsive

Giorgi 200

@siduki

Desktop design screenshot for the Social proof section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello everyone. My another solution is here. I know, Responsive is not so good, but for this time it's enough. Please, if you can check my code and give me some advices. Thank you.

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Hello @siduki, Congratulations on completing this challenge!

Great code and great solution! I’ve few suggestions for you that you can consider adding to your code:

To add the two wave svg background images in the (top/bottom),, the best way is by using background-image to manage it since adding them to the body you make sure it will be under everything, to manage different images inside a single css property as background-image you use the comma inside each properties declare the single modification for each wave svg image separated. See the code below to see your solution with those backgrounds applied:

body {
    min-height: 100vh;
    font-family: League Spartan;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(../images/bg-pattern-top-desktop.svg), url(../images/bg-pattern-bottom-desktop.svg);
    background-position: left -185px top -236px, right 10px bottom -300px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: contain, contain;
}

✌️ I hope this helps you and happy coding!

Marked as helpful

0

Giorgi 200

@siduki

Posted

@correlucas Thank you lucas.

I forgot about background image, because it's almost invisible :) I already added your piece of code to my code and it works, thank you.

0

@Jorggyh

Posted

Well done!

Some things I noticed, your rating-container is not centered, it seems to have a right margin but I didn't find it, try centering.

Your card container is more spaced between the second and third, I imagine it's because of the desktop version, you can try to change it in the mobile version and leave it like this in the desktop version.

https://i.postimg.cc/6pCJKCmY/some-points.png

The exchange point between the mobile and desktop version is 501px, but with 501px there is not enough space to show the desktop version, I would change it to 1024px which is where the design fits on the screen, or 768px if you adapt to tablets in the future.

Marked as helpful

0

Giorgi 200

@siduki

Posted

@Jorggyh Thank you for your feedback.

I noticed, your rating-container is not centered, it seems to have a right margin but I didn't find it, try centering.

I know this, I tried to center but can't find in my code, why it's not centered. I'll try it later.

Your card container is more spaced between the second and third, I imagine it's because of the desktop version, you can try to change it in the mobile version and leave it like this in the desktop version.

Yes, I know this, I tried to decrease space but something went wrong and stay for this time.

Thank you another time for your feedback. I'll try my best.

0

@Jorggyh

Posted

@siduki I downloaded your project on my machine to find the issues:

The problem with the right margin was the following, the width inside the .rating-container inside the media query was at 95%, I just changed it to 100%

and to give a side margin I added inside the .main-rating-container inside the media query:

padding-left: 25px;
padding-right: 25px;

speaking of .rating-container inside the media query, all these attributes are unnecessary, you are repeating:

display: flex;
align-items: center;
background-color: var(--light-grayish-magenta);
font-weight: 700;
color: var(--very-dark-magenta);
height: 3,125rem;
margin-top: 0.9375rem;
border-radius: 0.625rem;

You've already defined this before, you can just add something new or change something that has already been defined, making the code much leaner:

.rating-container {
  flex-direction: column;
  justify-content: center;
  width: 100%; /* was 95% */
  padding-left: 0rem;
}

the card margin is easy to solve, in your code you have:

.card-two {
  margin-top: 0.9375rem;
}

.card-three {
  margin-top: 1,875rem;
}

Just add inside the media query, to change in the mobile version:

.card-three {
  margin-top: 0.9375rem;
}

If you got confused, here is the css file with the changes: https://github.com/Jorggyh/test/blob/master/CSS/style.css

This solves the 2 problems, now 2 details that I particularly prefer, if you don't like it that's ok, it's not a rule:

I like to add at the top of the css file:

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 62.5%; /* 10px = 1rem */
}

This 62.5% font-size makes it simpler to calculate and more readable measurements with rem

And I also find it simpler to code the mobile version first, and then add a media query for the desktop version, for example:

@media screen and (min-width: 768px) {
  
}
0

Please log in to post a comment

Log in with GitHub
Discord logo

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