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

RESULT SUMMARY COMPONENT USING DISPLAY PROPERTY

RIDOULL 90

@RIDOULL

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I REALLY WISH TO IMPROVE MORE.

Community feedback

hitmorecode 6,230

@hitmorecode

Posted

Congratulations well done. A few tips to fix some of the issues

/* change this */
<p class="red"> <img src="assets/images/icon-reaction.svg"> Reaction <em><strong>80</strong> / 100</em>

</p>

/* to this */
<div class="red"> 
<div class="img-p">
<img src="assets/images/icon-reaction.svg"> 
<p>Reaction</p>
</div>  
<p class="score">80 <span>/ 100</span></p>
</div>


### CSS###
.red{
color: hsl(0, 100%, 67%);
background-color: hsla(0, 100%, 67%, 0.1);
width: 220px;
height: 30px;
padding: 0 5px;
padding-bottom: 10px;
}


### class red modified ###
.red{
color: hsl(0, 100%, 67%);
background-color: hsla(0, 100%, 67%, 0.1);
width: 220px;
height: 30px;
padding: 0 10px;
/*   padding-bottom: 10px; */
display: flex;
justify-content: space-between;
align-items: center
}


.img-p {
display: flex;
gap: 5px;
}

.score {
color: black;
}

span {
color: gray;
}

It's not good practice to wrap things around a p tag. It's best to use a div. Use flexbox to align everything inside those score boxes.

Marked as helpful

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