Is this 3 Column Preview challenge as clean as possible?
Design comparison
Solution retrospective
Hi everyone, thank in advance for checking on my solution!
First time using hidden 'h1'.
- is this actually the best practise?
I've tried to keep the CSS as clean as possible to increase readability.
- how did I perform on this?
Thanks in advance!
Community feedback
- @Yemisrach15Posted over 2 years ago
Hi Skippy, good job with this challenge!
Although I can't answer you question about the h1, I have some other feedback.
- As you can see here, the content is not fitting in the viewport width (>768px). Look into the
max-width
you set onmain
.
Marked as helpful0@skippysworldPosted over 2 years ago@Yemisrach15 I do understand your point. The solution is now created to be somewhat perfect for small devices (375px) and desktop (1440px). Somewhere in between it might look like the screenshot. My guess on your suggestion would be to use '%' or 'vw', which breaks a little the desktop size (1440px). That would require to be fixed afterwards using a second media query. Is that what you're suggesting?
0@Yemisrach15Posted over 2 years ago@skippysworld Yeah. I'm more comfortable with % so I would use that. The cause of the break might be
min-width: 300px
on.section
. Themax-width
onmain
is not the problem I was wrong. Try this- Remove
min-width
from.section
- Give percentage width to
main
- To correct the uneven height at around 1000px viewport width, set
align-self: stretch
on all.section
With the steps I wrote above, there is no need for another media query
Marked as helpful1@skippysworldPosted over 2 years ago@Yemisrach15 Yep, I see. I edited CSS locally and see the result. On 1440px it results with wider components (because %) but I get the point. It would be managable with already mentioned another media query.
Previously it was rather "hard coded" using
min-width: 300px
on section selector. I set that because of different heights of the columns when width of viewport was for example 870px. When I usealign-self: stretch
instead it solves the entire thing by itself. I'll need to fix different vertical position ofa
buttons though so it's not jumping up and down uncontrollably.I need to get more into percents and
vw
/vh
though. You have anything to recommend on that? I better understand the topic on practical examples than more or less theoretical MDN.0@Yemisrach15Posted over 2 years ago@skippysworld Other than searching it on google, none sorry. Push through the MDN docs though
1 - As you can see here, the content is not fitting in the viewport width (>768px). Look into the
- @DrMESAZIMPosted over 2 years ago
@skippysworldfirstly there is no problem at using H1 tags , secondly I like the commenting style used in the reset.css file .I would like to give a suggestion for a small project like this one is it not better to use one file for CSS that includes all the styling. Otherwise great work you deed
1@skippysworldPosted over 2 years ago@DrMESAZIM Hi! Actually the reset.css and commenting inside is not my work. It’s one of the many CSS resets out there (on the first line I think I mention the author).
Therefore I let reset.css alone and created my style.css aside :)
Using
h1
tags - as far as I remember, it’s not possible (or good practice) to use more than one on each page - here I have three headings that looks the same within very similar sections. That’s why I’ve decided to choose to hideh1
, keep it present for screenreaders and usedh2
for sections.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