Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 2 months ago

Responsive Blog Card using FlexBox

Codecblvck•20
@Codecblvck
A solution to the Blog preview card 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? 🎉 What I'm Most Proud Of

I'm most proud of how I was able to bring everything together—from semantic HTML and responsive CSS, to integrating a custom local font (Figtree) using @font-face. It was satisfying to see the design match the original layout across different screen sizes. I also learned how to use Git and GitHub effectively, which helped me track my progress and publish a live version using GitHub Pages!

🔁 What I'd Do Differently Next Time

Next time, I would:

  • ✅ Use CSS Custom Properties
    To maintain consistency and make it easier to update colors, spacing, and fonts across the entire stylesheet.

  • 📱 Improve Responsiveness Further
    Start with a mobile-first approach and refine layout breakpoints for better control between 320px and 1440px screens.

  • 🌐 Focus More on Accessibility
    Use better contrast, semantic HTML elements, and ensure the design works well for screen readers and keyboard navigation.

  • 🔍 Write a Clearer README
    Include instructions for setup, font usage, screenshots, and live preview links to make the project more shareable and professional.

  • 🛠️ Experiment With New Tools
    Try out Tailwind CSS, SASS, or even a basic JavaScript enhancement to add interactivity.

What challenges did you encounter, and how did you overcome them? 🧠 Challenges I Faced & How I Overcame Them
  • Responsive Layout Issues
    Challenge: The layout was not consistently looking good across different screen sizes, especially on mobile (320px).
    How I Overcame It: I adopted a mobile-first approach by using flexbox for layout control, adjusted the widths to percentages, and fine-tuned my breakpoints with media queries to ensure the layout adapts smoothly to different devices.

  • Font Integration Using Local Files
    Challenge: I was unfamiliar with integrating local fonts (like Figtree) into my project, and encountered issues with linking .ttf font files.
    How I Overcame It: I learned how to use @font-face in CSS to integrate custom fonts. After verifying the correct path and ensuring I specified the right font weights, I successfully applied the Figtree font across my project.

  • Too Much Space Between Elements
    Challenge: There was excessive space between elements like .info and the footer, which disrupted the layout.
    How I Overcame It: I used Chrome DevTools to inspect the layout and discovered the issue was related to unnecessary padding and margin values in the inner containers. After adjusting these values, everything aligned as intended.

What specific areas of your project would you like help with? ❓ Areas Where I’d Like Help
  • Responsive Design Tweaks
    While the layout is mostly working on mobile and desktop, I'm still struggling with some of the fine-tuning for medium screen sizes (e.g., tablets). I would appreciate advice on better handling media queries and improving the responsiveness across all devices.

  • Font Loading & Performance
    I used a custom local font (Figtree), but I’m concerned about performance. I’m not sure if using @font-face is the most efficient way to load fonts. Any suggestions on better practices for font loading (like font-display or using preload) would be really helpful.

  • CSS Performance Optimization
    I’m looking for tips on improving the performance of my CSS, especially as my styles grow. Are there any performance issues I should be aware of with my current setup, or best practices for writing efficient and fast CSS?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    ctspecht12•90
    @ctspecht12
    Posted 2 months ago

    Overall, I think you nailed it. Just minor suggestions based on the challenges you reported:

    For loading fonts: I rarely use local fonts, and would recommend using Google Fonts to load the fonts. With Figtree for example, all you have to do is select the "Get Font" button and then select "Get Embed Code," which will give you this:

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
    

    By copying and pasting this into the <head> section of your HTML, you'll have full access to the font.

    For media queries, you can create CSS styles for any page size. What I do is start with the desktop layout and shrink the window until something breaks. Then I use Inspect to check the window size. I'll then set my first @media query to (max-width: 720px) (Or whatever size just before it breaks) and then write the CSS to adjust it. I usually only have to go through this 2-3 times to cover all screen sizes.

    You're really doing great, and I hope this was helpful. Please let me know if you have any follow-up questions.

    Marked as helpful
  • wxyzz22•240
    @wxyzz22
    Posted 2 months ago

    Good job! And super well summarized!

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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