This is my Solution for Testimonial webpage challenge
Design comparison
Solution retrospective
Hey!! if you are checking repo please check the style.css file, my media query is not working, Please help me if u can . Thenks!
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @Bingolast, congratulations on your new solution!
I’ve some suggestions for you:
Something you can do is to improve your html markup using meaningful tags and replacing the divs. In this case, for example the main block/div that takes all the content can be wrapped with
<main>
or section, if you think about = the cards you can replace the<div>
that’s wrapping each card with<article>
you can wrap the paragraph with the quote with the tag<blockquote>
this way you'll wrap each block of element with the best tag in this situation. Note that<div>
is only a block element without meaning, prefer to use it for small blocks of content inside bigger blocks wrapped with some better markup.This article from Freecodecamp explains the main HTML semantic TAGS: https://www.freecodecamp.org/news/semantic-html5-elements/
👨💻Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/testimonials-grid-section-vanilla-css-focus-effect-custom-design-e5bIzU3vZN
✌️ I hope this helps you and happy coding!
0@BingolastPosted about 2 years ago@correlucas Thank you so much dude. I really was thinking how i can make my code more optimize thanks!
0 - @AhmedLebdaPosted about 2 years ago
Hi @Bingolast Congratulations on solving this challenge.
You just need some modifications for your CSS file:
-
You need to put your media queries at the end of your CSS files (after the main styles) because by putting them before your main styles you overwrite them again with the main styles that is the main reason your media styles don't work.
-
Your
.card:nth-of-type(3)
have agrid-column: 4;
you only want 1 column with 100% width but you tell the browser you want this card to be on the 4th column so the browser will translate this as if there were 4 columns even if you already defined thegrid-template-columns: 1fr
in the parent element, so by changing that togrid-column: 1;
you will get your wanted result.
- Worth mentioning resource : Kevin Powell video on CSS grid , he teaches grid easily with this same challenge example , I really recommend to watch it, you will definitely learn a lot from it.
Happy Coding
0@BingolastPosted about 2 years ago@AhmedLebda Thank you mate! i never thought of this. I tried so many things (literately banded my head on the desk almost breaking my keyboard) that was a huge help!
0 -
Please log in to post a comment
Log in with GitHubJoin 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