Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Blog Preview Card using CSS

Celine Tranβ€’ 120

@CelineTrann

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Is there a standard on how to organize and name CSS? Also, sometimes my text spacing is off depending on the screen size. Is there a way to make text sizes more responsive asides from media queries?

Community feedback

@MelvinAguilar

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • Avoid setting a fixed height for the component; remove "height: 60%" because it can cause text overflow if the content grows. On my laptop, the text overflows.
  • For width, avoid using a percentage. Instead, use max-width to allow the component to adapt to different devices without the need for media queries.
  • Consider using the clamp function in CSS for font-size to make the font responsive without the need for media queries.

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

1
Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

Hello Celine!

Your solution looks awesome!

About your question:

  • Another option is using the clamp ( ) method in your coding for font-size, width, margins, padding, etc., So the designed sizes will change according to the viewport dimensions having a responsive design and will be suitable for any device layout. Hope it helps!

And Happy New Year! 😁

0

John Carruthersβ€’ 310

@techyjc

Posted

@danielmrz-dev Interesting, seen clamp used a lot for better responsive design, alone side the minmax function. I have used it in my personal project, currently writing a Help Desk solution using PHP.

Apologies saw your comment for this solution by Celine and thought I'd reply.

2

Please log in to post a comment

Log in with GitHub
Discord logo

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