Design comparison
SolutionDesign
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some feedback for you if you want to improve your code.
HTML π:
- The best way to create two columns in CSS is to use the grid layout π.
Using the grid layout, you can create two columns by setting the display property of the parent element to grid and then defining the number of columns you want with the
grid-template-columns
property.
<div class="md:grid md:grid-cols-2"> <div>Column 1</div> <div>Column 2</div> </div>
-
You could use the
<del>
tag to indicate the price that was before the discount. Additionally, you can use asr-only
class to describe the discount. This will help screen reader users to understand that the price was discounted.Example:
<del class="text-DarkGrayishBlue"><span class="sr-only">Old price:</span> $169.99</del>
- You can use the
<picture>
tag when you have different versions of the same image πΌ. Using the<picture>
tag will help you to load the correct image for the user's device. You can read more about this here π.
I hope you find it useful! π
Happy coding!
1 - The best way to create two columns in CSS is to use the grid layout π.
Using the grid layout, you can create two columns by setting the display property of the parent element to grid and then defining the number of columns you want with the
Please log in to post a comment
Log in with GitHubJoin 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