@KristinaRadosavljevic
Submitted
@ssembatya-dennis
@KristinaRadosavljevic
Submitted
@ssembatya-dennis
Posted
๐พ @KristinaRadosavljevic I congratulate you upon completing this challenge
Hmm I have noticed your solution is Figma perfect and it really scales well wiz various media screen sizes. Your CSS Grid Layout skills are just amazing and I just got inspired looking through your various solutions.
โ๏ธ I really wish you a happy coding moment
Marked as helpful
@joaovitorwitt
Submitted
I am open to suggestions and tips. All comments are helpful
@ssembatya-dennis
Posted
๐พHello @joaovitorwitt, Congratulations on completing this challenge!
Great code and great solution! Iโve few suggestions for you that you can consider adding to your code:
Youโre on the right track I can see that youโve used semantic tags well and the site is very responsive, the only thing you might have missed is the image mix-blend mode on the image in the image-wrapper
div. I personally recommend going with background-blend-mode
approach of blending the a linear-gradient()
with your img
to get it looking like the figma design rather than the filter
style for this particular solution.
/*filter approach*/
.image-wrapper img {
filter: invert(10%) sepia(68%) saturate(4400%) hue-rotate(241deg) brightness(50%) contrast(89%);
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
/*mix-blend-mode approach*/
.image-wrapper {
flex: 1;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px
background: linear-gradient(rgba(72, 15, 107, 0.6), rgba(170, 92, 219, 0.2)),
url(./images/image-header-desktop.jpg);
background-blend-mode: multiply;
background-size: cover;
background-repeat: no-repeat;
}
โ๏ธ I hope this helps you and happy coding!
Marked as helpful
@K-Muzslay
Submitted
Hello, I made the picture swap using HTML <picture> element, but I found another solution using CSS media query. Which is the better solution?
@ssembatya-dennis
Posted
I personally believe the picture tag is the best way to approach this issue because the picture tag not only helps you to swap which image to display at what media screen size but also assists the user to download only the right recommended image for his screen size which saves band width.
The other way of doing it in CSS doesn't eliminate the fact that both images are still available in the DOM but just hiding one and displaying the other at different screen sizes hence wasting band width since the user has to download both the one is sees and the one that CSS is hiding.
Marked as helpful
@davutpiro
Submitted
Hello everyone, this is my second project here. I look forward to all the advice, especially the ones to make my code cleaner. :) Thanks a lot.
@ssembatya-dennis
Posted
Hi Davut Piro, I congratulate you upon completing your second challenge on the platform however have noticed your solution doesn't render well on small mobile media screen.
background-blend-property
in the <div class="img"></div>
container to blend the image and your gradient smoothly.<p></p>
tags as they are the sematic tags responsible for holding small text and only use a div in areas where you want to position some content in a specific position or to improve on space around your content.<div class="numbers">
<div class="companies"><span class="num">10k+</span> companies</div>
<div class="templates"><span class="num">314</span> templates</div>
<div class="queries">
<span class="num num3">12m+</span> queries
</div>
Thanks you so much and wish you happy coding!
Marked as helpful
@Kureon
Submitted
@ssembatya-dennis
Posted
For the case of font sizes from the desktop view to mobile media screen sizes, I personally recommend setting a root font size and using relatives units like rems for fonts such that for small media screens you just reduce the root font size and all fonts sizes for various elements shrink proportionally. //e.g setting for the desktop version html { font-size: 62.5%; }
Marked as helpful