@kayy-w
Posted
Hey! Your solution is really awesome, I absolutely love the rollover with the increased drop shadow. This is a nice little touch. My only suggestions would be to:
- Possibly cut the
<div class="pattern-background">
, you could put the background on the main card itself, saving some html coding. You could also consider using flex for this top half of the card as well as the info section below. - Consider using a border rather than a
<hr>
, just to make the html more succinct. - You could cut down on the amount of
p
tags inside<div class="statistics">
, you use six in total but you could use three with either a<strong>
or a<span>
to style the numbers. This may make your code more semantically correct as well.
Really awesome solution, it looks almost identical to the design and I do love the added touch of the rollover. Congrats! 🙌
Marked as helpful
@bhoamikhona
Posted
Hi, @kayy-w
Thank you for your suggestions as well as compliments. I appreciate it.
For div.pattern-background
, it has two purposes. One of them is the obvious, displaying the pattern image but, the other one is being the relative
parent container for the absolutely placed avatar image. This div
makes it easier for me to place the avatar and if I place the background directly on the card, sure it may lessen a couple of lines of HTML code but, it will considerably increase the amount of CSS code to create the same layout again. Other than that, the rest of the cards margin is also dependent on that div
.
About the hr
and decreasing the number of p
elements. I will come back to this challenge at a later date and fix as I have already moved on to the next one. However, I will keep your suggestions in mind for the next time I have to build something similar.
I appreciate you taking time and writing these suggestions.
Thank you!