Design comparison
Solution retrospective
The way I added the curved Imae to the background, I dnt know if it is the best practice.
Also, I tried to use the picture Tag, but it kept breaking my page, anyone has any Ideas?
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi! 👋
Good effort on this challenge! 👍
Here are some suggestions for improvements.
- The "change" is an interactive element. So, it should be wrapped by an interactive element. It could be either
a
orbutton
, depending on what you think will happen after the users click it. - For your information, anchor tags are for navigation, while the
button
elements are for actions like opening a modal, submitting a form, toggling element, etc. It is essential to use the correct elements. input
withtype="button"
was used before thebutton
element exist. It's best to avoid using legacy elements. So, I recommend usingbutton
element instead.- For images that are used only as decorations (they do not give users any information and serve only an aesthetic purpose), the alt tag should still exist but should be left empty:
alt=""
. This will tell the screen reader to simply skip over the image. - Never limit the height of the
body
element. It will not allow the users to scroll the page if the page content needs moreheight
. You can see the issue by looking at the site on a mobile landscape view. So, my recommendation is to usemin-height
instead. - Never use
100vw
on thebody
as it doesn't account for scrollbars when present. It may only ever introduce potential overflow/scroll bugs. - Use the
em
unit for media queries. It adapts when the users change their font size setting. Here are some references.
I hope this helps! Happy coding!
0 - The "change" is an interactive element. So, it should be wrapped by an interactive element. It could be either
- @AdrianoEscarabotePosted about 2 years ago
Hi IJEOMA NNAEMEKA PASCAL, how are you?
I really liked the result of your project, but I have some tips that I think you will enjoy:
To prevent the background image from breaking at higher resolutions, we can prevent this in two different ways:
-
Add a
background-repeat: repeat-x;
, the image will repeat on the horizontal axis, preventing it from breaking. -
Add a
background-size: 100% 50vmin;
, the50vmin
will set its height as the page target, and100%
will make it stretch on the horizontal axis.
Feel free to choose one of the two!
The rest is great!
I hope it helps... 👍
0@iamdrmekaPosted about 2 years ago@AdrianoEscarabote
Would you mind checking the code to see if I added the background the right way?
0@AdrianoEscarabotePosted about 2 years ago@iamdrmeka do this:
body { background-image: url("./images/desktop.svg"); background-repeat: repeat-x; }
0@iamdrmekaPosted about 2 years ago@AdrianoEscarabote
Okay. Thanks. How do I merge it with the other color?
0 -
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