Design comparison
Solution retrospective
I found very complicated to scale the BG for diferent screen sizes. What would be the best way of using multiple background images?
My approach was to scale the size and position of the images according to the width and height of the screen. Which lead me to a media query marathon, without great fluidity.
Any recomendations on this topic regard?
Many thanks...
Community feedback
- @danielmrz-devPosted 10 months ago
Hello @Alex-Gamarano!
Your solution looks great!
The background pattern with the circles is a bit tricky, but here's how you can do it:
š Add this to the body:
background-color: var(--Dark-cyan); background-image: url("./images/bg-pattern-top.svg"), url("./images/bg-pattern-bottom.svg"); background-repeat: no-repeat, no-repeat; background-position: right 52vw bottom 35vh, left 48vw top 52vh;
I hope it helps!
Other than that, you did an excelent job!
Marked as helpful2@Alex-GamaranoPosted 10 months ago@danielmrz-dev , thank you very much for the feedback. I spent so much time working with proprtions that I did not realize it was possible to also define a 'corner' position alongside the deviation of each axis.
Cheers mate!
1 - @hassanmoaaPosted 10 months ago
Hello @Alex-Gamarano
I see you fixed your background problem, well done!
but i see a minor problem that could mess your project if it's bigger and there are more content in it.
p { margin: 15px 0 5px; } span { font-size: 14px; }
for the paraghraph it's is better to use rems and ems for margins and paddings but px for this project is no big deal.
i see you using pixels for many elements, never use pixels for font-sizes in any element, here's why:
- Certain font-related CSS properties will render your site completely inaccessible if their value is declared using pixels even once.
Which properties are affected?
All of these properties must never ever be declared in pixels.
- font-size
- line-height
- letter-spacing
If you've used pixels to define any of the above style properties, these will not respect the user's font size preferences!
- You should use ems, and rems for font-sizes would be better.
This article may help:
https://fedmentor.dev/posts/font-size-px/
Other than that you're good, keep up the good work!
Good luck mate.
Marked as helpful0@Alex-GamaranoPosted 10 months agoThank you @hassanmoaa. Normally I reset the root font-size to 62,5% and use rem for the rest of the elements. As I'm doing all these exercises, I'm taking a quicker approach to focus on the real challenging parts of these. Nevertheless thank you for your input.
Best reagards,
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