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

Card Summary Using Css Flex Box and Before Pseudo Element

@Smartlify08

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Is there a better way to do that prices box , where the image has a similar background color with the text box. Is there a way to achieve separating them instead of using a before pseudo element

Community feedback

Vanza Setia 27,795

@vanzasetia

Posted

Hi, Anosike Obinna! 👋

Regarding your questions:

  • I am afraid that I don't understand the question. But, you can find the color code in the style-guide.md. Also, the background color of the .card element should be pure white (hsl(0, 0%, 100%)).
  • I notice that you set the background color of the .card-body .text-box with pseudo-element. Why don't just set background-color on the element itself? Sorry, I don't understand your questions. 😅

I have a few suggestions for this solution.

  • I would recommend making the h3.text-dark" as h2 instead. Keep in mind that headings must be in a logical order. Users of assistive technology can use heading tags to navigate the website. If headings are not in a logical order, those users might get confused.
  • Make the .text-fade as p element instead. I would recommend thinking of the HTML as the document. So, h1 would be the main title, h2 is a sub-title, etc.

That's it! Hope this helps.

Marked as helpful

1

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