Design comparison
Solution retrospective
How did you get the text "sedan, suvs, and luxury" to be as tall? I did a y-axis transfom.
Community feedback
- @darryncodesPosted almost 3 years ago
Hi Scott,
Great effort here - well done!
As well as the feedback above, your design is jumping slightly when you hover the button. This is because you have added the
border
property on hover. Move it to the normal styles and it'll fix it.All the best!
Marked as helpful0 - @vanzasetiaPosted almost 3 years ago
š Hi Scott!
š Congratulations on finishing this challenge! I have some feedback on this solution:
- Accessibility
- Only have one
h1
for every page. Heading one is a unique identifier for each page. In this case, you can have hiddenh1
withsr-only
styling and make the other heading tags toh2
. - Heading tag is similar to a title in a document file.
- There's no need to make the
Learn More
button as a heading tag. - Create a custom
:focus-visible
styling to any interactive elements (button
, links,input
,textarea
). This will make the users can navigate this website using keyboard (Tab
) easily. - Always have
alt
attribute for allimg
tags. To treat decorative images, you can leave thealt=""
empty and addaria-hidden="true"
to make all web assistive technologies such as screen reader ignore those images. - Wrap all the page content with
main
tag, except the attribution. - For the attribution, you can swap the
div
withfooter
tag. - Use
rem
or sometimesem
unit instead ofpx
. Usingpx
will not allow the users to control the size of the page based on their needs.
- Only have one
- Visual
- The font family for the headings is different from the design.
- Best Practice (Recommended)
- Try mobile-first approach when writing your stylesheet, which means instead of using
max-width
, you'll usemin-width
instead for the@media
query. It often makes me write less code. - Use
font-size
property instead oftransform
property.
- Try mobile-first approach when writing your stylesheet, which means instead of using
h1 { color: hsl(0, 0%, 95%); padding: 1rem; transform: scale(1, 1.5); }
That's it! Hopefully, this is helpful!
Marked as helpful0 - Accessibility
- @droopydevPosted almost 3 years ago
Hey Scott! For the buttons, using the native HTML <Button> element is a much suitable choice as it provides a semantic meaning as compared to creating a button using div. I see that you also repeated CSS properties across 3 different classes (.button1 .button2 .button3). A better way is since all three buttons has the same .button class, you can write the same CSS properties (padding: 1em 2em) for that class and it will be applied to all 3 buttons.
Marked as helpful0@vanzasetiaPosted almost 3 years ago@droopydev Yes, using the
button
element is better thandiv
, but commonly the if the user clicks theLearn More
button, it will navigate the user to a certain page which is whata
tag will do.The button element is used to perform an action, like opening a modal, etc. While link (anchor tag) is used to navigate the user to certain page.
Marked as helpful1@droopydevPosted almost 3 years ago@vanzasetia You're right, I missed out on the context here for the use case of the button. Great that you point that out. šš»
Marked as helpful0
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