Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 month ago

Responsive Four Card Feature Section using Tailwind CSS

tailwind-css
Amiko Elvis•190
@amikoelvis
A solution to the Four card feature section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm most proud of creating a responsive and visually accurate layout using Tailwind CSS. The grid system (md:grid-cols-2 lg:grid-cols-3) allowed me to achieve the challenge’s unique desktop layout, with the Supervisor and Calculator cards vertically centered using lg:row-span-2 lg:self-center. Tailwind’s utility classes streamlined my styling process, enabling me to match the design’s colors, typography (Poppins font), and spacing efficiently. Additionally, I prioritized semantic HTML (header, main, footer) and included alt attributes for accessibility, which improved the structure and usability of the page.

Next time, I would focus on enhancing accessibility further by adding ARIA landmarks (e.g., role="region" for cards) and ensuring keyboard navigation. I’d also optimize the image paths; the ../images/ references in my HTML caused minor issues during testing, so I’d move images to a ./images/ folder for consistency. Additionally, I’d experiment with CSS animations (e.g., hover effects on cards) to add interactivity and explore image optimization (e.g., converting SVGs to WebP) for faster load times.

What challenges did you encounter, and how did you overcome them?

One major challenge was aligning the cards correctly on desktop to match the design’s layout, where the Supervisor and Calculator cards are vertically centered alongside two stacked cards (Team Builder and Karma). Initially, my grid layout didn’t position the cards as expected on larger screens. Another challenge was ensuring the mobile-first approach transitioned smoothly to tablet and desktop breakpoints without breaking the layout.

To address the desktop layout, I used CSS Grid with lg:grid-cols-3 and lg:row-span-2 to span the Supervisor and Calculator cards across two rows, paired with lg:self-center for vertical alignment. Tailwind’s media query classes (md:, lg:) simplified this process. For responsiveness, I adopted a mobile-first workflow, starting with a single-column layout (grid gap-6) and progressively adding columns for larger screens. Testing across devices using browser dev tools helped me fine-tune breakpoints and spacing.

What specific areas of your project would you like help with?

I’d appreciate feedback on the following areas:

  • Accessibility: Are there specific ARIA roles or attributes I should add to improve screen reader support or keyboard navigation?
  • Code Structure: Is my HTML structure semantic enough, or are there better ways to organize the card components for maintainability?
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Amiko Elvis's solution.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.