Design comparison
Solution retrospective
Fifth challenge from Frontend Mentor.
Quite a challenge I might say. I have worked before with flexbox and grid to better arrange divs, but never used the Grid layout as the main concept. I am quite happy with the final result of the mobile design, although I might say the quote-image on the background for some reason doesn't appear. On the other hand, I can see I am struggling with media queries and as such the width on the desktop design looks weird. Because of that, I will appreciate any advice and suggestions on how to improve the Desktop design.
Again, thanks a lot FrontMentor and FrontMentor team to allow me to challenge my skills and improve my self.
Community feedback
- @MelvinAguilarPosted about 1 year ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
-
In your
.box1
class, there seems to be a typo in thebackground-image
property. The "no repeat" should be moved to thebackground-repeat
property.If you want to define several properties on one line it is using
background
notbackground-image
.Corrected, it would be:.box1 { grid-row-start: 1; grid-row-end: 3; background-color: var(--moderate-violet); background-image: url(./images/bg-pattern-quotation.svg); background-repeat: no-repeat; background-position: top right; }
If you want to consolidate those background properties into a single background property, you can do it like this:
background: var(--moderate-violet) url(./images/bg-pattern-quotation.svg) no-repeat top right;
- Consider adding
max-width: 1160px
to constrain the content width on larger screens. Additionally, you can use Flexbox or Grid on the body element to center it more effectively.
I hope you find it useful! ๐
Happy coding!
Marked as helpful1@rowanDeveloperPosted about 1 year agoThanks a lot @MelvinAguilar! To be honest, your comment was really useful! I really appreciate your insight.
0 -
- @anttiromppanenPosted about 1 year ago
If your quote-image shows on development, the problem is probably related to the background url: https://stackoverflow.com/questions/57976049/background-image-does-not-work-on-github-pages
If this the case, try changing the path "./images" to "/images" or "images", push to github and see if any of those fixes your issue
edit: โ this probably fixes your problem
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