Design comparison
Solution retrospective
I was happy to be playing around with offset of the large circles.
What challenges did you encounter, and how did you overcome them?using the relative and absolute positioning. was good practice.
What specific areas of your project would you like help with?Still unsure of the HTML semantics for a card. If anyone can provide a proper HTML semantic layout for a card that would be great.
Community feedback
- @0xabdulkhaliqPosted 8 months ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have a suggestion regarding your code that I believe will be of great interest to you.
BACKGROUND iMAGE 📸:
- Looks like the background images has been set using individual
img
elements which are wrapped up withfigure
, Actually we don't need to struggle to set them up with this method there's an easy way to handle this problem with positioning the background images
- So let me share my css snippet which helps you to easily apply the
background color
with thebackground svg
they provided to place perfectly as same as design.
- Add the following style rule to your css, after completing these steps you can experience the changes.
body { background: url(./images/bg-pattern-top.svg), url(./images/bg-pattern-bottom.svg); background-position: right 52vw bottom 35vh, left 48vw top 52vh; background-repeat: no-repeat, no-repeat; background-color: hsl(185deg, 75%, 39%); }
- Now you can remove these individual
img
elements from thehtml
<figure class="top"> <img src="./images/bg-pattern-top.svg" alt="bg-pattern-top"> </figure> <figure class="bottom"> <img src="./images/bg-pattern-bottom.svg" alt="bg-pattern-bottom"> </figure>
- Tip, Don't forget to generate a new screenshot after editing the
css
file
- If you have any questions or need further clarification, you can always check out
my submission
for this challenge and/or feel free to reach out to me.
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@UFXtrendscalperPosted 8 months ago@0xabdulkhalid Thank you great feedback I have put that as notes into the project so when I revisit and attempt again I will utilize that.
0 - @Pawel-GnatPosted 8 months ago
Hi mate :)
JFYI, if you are working with images that are decorative only (like an avatar of current user) you should use proper alts and aria labels for screen readers and A11Y requirements.
Example: <img src="./images/image-victor.jpg" alt=""> <img src="./images/bg-pattern-card.svg" aria-hidden="true">
now screen readers won't read them :)
But if you want to use alt for SEO or A11Y purpose, remember to make them as descriptive as possible :)
GL!
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