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

3-Column Preview Card Component | HTML5, CSS3, Grid & Flexbox

David Ochoaโ€ข 290

@davidochoadev

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello Everyone ๐Ÿ‘‹

I have successfully completed the challenge utilizing the following:

  • Mobile-first approach
  • HTML5
  • CSS3
  • Flexbox
  • Grid

I do have a question regarding font importing using the link provided by Google Fonts. I attempted to paste the @import code below the :root selector, but the fonts didn't change. As a result, I had to import them within the HTML file. I would like to know the most efficient and performance-friendly method of importing fonts. Should I download and manually upload the font files to the repository? I appreciate your assistance in answering this question.

Thank you in advance for your response.

Best regards,

David Ochoa

Community feedback

@VCarames

Posted

Hey there! ๐Ÿ‘‹ Here are some suggestions to help improve your code:

Regarding your question, it is best practice to link the font-family in the HTML due to performance (even if it is minimal).

  • The section and figure elements are being used incorrectly โŒ. section are for sections of a page while the figure is only used when there is a figcaption.
  • Your "buttons" were created with the incorrect element โŒ. When the user clicks on the button they should be directed to a different part of you site. The anchor tag will achieve this.

More Info:๐Ÿ“š

MDN The Anchor element

  • For "visually hidden" content use the following code:
.visually-hidden {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
overflow: hidden !important;
margin: -1px !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}

If you have any questions or need further clarification, feel free to reach out to me.

Happy Coding! ๐Ÿ‘พ

Marked as helpful

1

David Ochoaโ€ข 290

@davidochoadev

Posted

@vcarames Thank you for your response,

and please forgive me for bombarding you with questions again. In this case, since we are dealing with icons, the <picture> tag or even the <figure> tag would not be appropriate, correct? Should I settle for a <div>? Or is there a specific container element that is more suitable for wrapping these non-descriptive, purely decorative elements?

1

@VCarames

Posted

@davidochoadev

Ask as many question you have. Thatโ€™s why Iโ€™m here for.

The icons donโ€™t need to be wrapped by anything; img on its own is enough.

The only time youโ€™ll use the picture element is when you re using different sized images during different breakpoints. As for the figure, only if there is a figcaption.

0

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