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

Blog-preview-card

Mehakdeep Kaur•100
@Mehak-deep-kaur
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

I’d really appreciate it if you could take a moment to share your feedback on this project. I'm open to suggestions on how I can improve and would love to hear your thoughts on what worked well and what could be done better.

Also, if there are any specific areas I should focus on or keep in mind for future projects, I’d be grateful for your guidance.

Thankyou!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Domagoj Babic•250
    @DomCroatia
    Posted 4 months ago

    Hey, congratulations on finished challenge!

    First thing I'd like to mention is semantic HTML. Having a lot of divs as a containers for content is ok, but they don't have any meaning whatsoever. For example, instead of using div with class='container', you could use <main> element and <article> instead of div.main. It makes your content more meaningful for screen-readers and other assisted technologies. Some other semantic elements besides main are: article, section, aside. footer, header, nav (I'm probably missing some). For smaller projects like this we don't use a lot of them but using them is good habit to develop.

    Regarding responsiveness, you don't have to give your elements strict width or height value. You can use min/max width/height (ex., min-height:100vh; on body element so it always takes full height, but expands more if content requires it or max-width on div with class of .card helps with content in your card stretching too far on big screens, and helps make card smaller on smaller screen because content in it dictates it's size).

    Also I noticed your button has width on it aswell. If you reduce viewport bit-by-bit you can see that at some point yellow background on it is not covering full button. The reason is because it is "reduced" to 25% of width. Better way to do this, in my opinion, is to add align-items: start; on parent element and remove width property from button, you can see now that background covers full width of it.

    Lastly, you put your img element into div, (and I think that is good for styling purposes), but you didn't give that div width: 100%; to make it responsive.

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

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