Three-column Preview Card using Flexbox & minimal CSS
Design comparison
Solution retrospective
This challenge was simpler than some of the previous ones I've attempted as the columns were pretty straightforward to build. I tried to make them as simple as possible while avoiding repeating CSS classes. Unfortunately, there's no way to make the font-color
"inherit" each section's bg-color
, and therefore I had to add three lines and specify each of the sections in my CSS. Thankfully, the variables came in handy.
To avoid the <h1> error in the generated report, I created the following:
<header>
<h1 class="sr-only">Learn more about car rental options</h1>
</header>
This allows Screen-readers to get some additional details while hiding the h1 from others. Then wrap it in the header
tag.
Let me know if you notice anything funky or if you have any feedback to offer!
Community feedback
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