Design comparison
Solution retrospective
how would I get the text in the light purple divs to stay one line until my first breakpoint? should I make a larger first breakpoint and lower the text size manually so it stays one line? or is there an easier way? I tried using .clamp() due to a suggestion on my last challenge, but I couldn't get it to work the way i wanted to.
Community feedback
- @pikapikamartPosted over 3 years ago
Hey, are you referring to the part that when resized, the text wraps into another row? Well, one way to fix this is, instead of using
%
in yourwidth
declaration, you could just used a fixed unit, like pixels, or rems. So that even if your site resizes, the container holding that stars and text will not be resized and will make the text in one line. Unlike the%
it scales relative to the parent.Also while you're at it, I think you forgot to add the two background image, have a look in the original design, the light grey-ish thing.
Apart from that, the layout resizes well when going in mobile. If you need help regarding your query, just drop it here okay^
0@jamby4546Posted over 3 years ago@pikamart thank you for the feedback! lol I did totally forget to add the background. whoops! regarding media queries, I was wondering what standard practice is for making responsive layouts. is it standard to have a breakpoint and new layout at 1088px, and then another different layout for 600px? or is it okay just to have the breakpoint at 1088 and have it look the same as it goes down to mobile?
0@pikapikamartPosted over 3 years ago@jamby4546 Well it depends right. First, inspecting your element in developer tools and try to resize the viewport. Take note of the size or the dimension, where the elements get squished down or changes the layout or when a scrollbar appears right. That is when we want to make media breakpoints. Make the small changes at that breakpoint to the elements that looks sort of distorted, destroyed.
Well, it is really up to the programmer right hahaha^^
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