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

7-column-preview-card-component CSS HTML NEWBIE

Cookiemonsterhxcโ€ข 200

@Cookiemonsterhxc

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


The transparent color dont know what to do I used the transpa white color but still not the same on the design image

Cant fix the media query

Community feedback

Vanza Setiaโ€ข 27,795

@vanzasetia

Posted

Hi, Cookiemonsterhxc! ๐Ÿ‘‹

First, I recommend using a code-formatter. This way, your code base will have a consistent format, which makes it easier to read the code. I suggest using Prettier as your code-formatter.

Prettier ยท Opinionated Code Formatter

About the issue, if you take a look at the design, you should see that all the buttons have white background color at first. Also, the text color of each button is the same as the card's background color. So, you need to fix the styling for the initial state.

Then, for the hover state, you should set background-color: transparent and change the text color to white for all the buttons.

Here are some other suggestions for improvements.

  • Replace all the <h1> with <h2>. There should not be more than one h1 on a page. Many <h1> elements mean many titles which can confuse the users, especially the screen reader users.
  • The car icons are decorative images. So, you should leave the alternative text empty.
  • Style the <a> directly instead of wrapping the anchor tag with a <div>.

For your next project, I recommend writing the CSS using the mobile-first approach (using min-width media queries). The mobile layout is simple. So, you only need to add more complex styling for larger screen sizes.

Related resources:

I hope this helps. Happy coding! ๐Ÿ˜„

Marked as helpful

0

Cookiemonsterhxcโ€ข 200

@Cookiemonsterhxc

Posted

@vanzasetia Thank you very much

0
Vanza Setiaโ€ข 27,795

@vanzasetia

Posted

@Cookiemonsterhxc

No problem! ๐Ÿ‘

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