@vanzasetia
Posted
Hi, Brian! π
I have some suggestions to improve this solution.
- Remove all the
<div>
elements except for the card elements. - Use
<main>
element as the flex container of the cards. - All the anchor tags point to IDs that don't exist. None of the HTML elements that have
Sedans
,SUVs
, andLuxury
as the value of theid
. - Don't use
id
selectors for styling. There are two reasons for not using IDβs to style content:- They mess up specificity because they are too high (the most important reason).
- They are unique identifiers. So, they are not reusable on the same page.
- Learn more about the use cases of
id
by reading β What the ID attribute is REALLY for. The article is written by @grace-snow. - You don't need to use
!important
in this case. If you start using it, it is a sign that the stylesheet is having high specificity. - Use single-class selectors whenever possible. This can help you produce a low-specificity stylesheet. As a result, it prevents you from having specificity issues.
I hope you find this useful. π
Marked as helpful
@briangesteban
Posted
Hi @vanzasetia!
Thanks for all of these. I'll take note on all of it. Appreciated the feedback!