Latest solutions
Interactive comments section with Node.js & Next.js
#next#node#react#tailwind-css#framer-motionSubmitted 11 months agoGalleria slideshow site with Next.js & TypeScript
#next#tailwind-css#typescript#framer-motionSubmitted 11 months agoGitHub user search app with React and Tailwind CSS
#react#sass/scss#tailwind-css#typescriptSubmitted over 1 year agoAdvice generator app with React & Tailwind CSS
#react#tailwind-css#vite#sass/scssSubmitted over 1 year agoCalculator app with React & Tailwind CSS
#react#sass/scss#tailwind-css#vite#typescriptSubmitted over 1 year ago
Latest comments
- @suvankarpradhan@FlorianJourde
Hey man,
Good job on this one !
About the bento grid, I think you should have a better layout by using this approach :
.container { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; grid-template: repeat(2, minmax(0, 1fr)) / repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1200px; margin-left: auto; margin-right: auto; width: calc(100% - 50px); }
With this solution, you layout is already responsive-proof, you only have to alter the grid itself, not the entire layout. Avoiding relative width and height like
vw
,vh
&%
is generally a good practice (except for specific cases).I would also recommend you to switch you grid to
flex
andposition: static
placement. Withjustify-content
andalign-items
andmin-height: 100svh;
directly on yourbody
, you must be able to place you grid centered vertically without any issues 🙂Good luck for you next challenges ! ✌🏻
- @evansanchez963@FlorianJourde
Hey @evansanchez963 !
You did it well !
My main advice would be to be careful about responsiveness on small screens. When screen size is under
550px
, your layout begin to break. This is because of images. To fix that bug, you could just add awidth: 100%
property on some images, like for example, the#article img
.By this way, your images will never be bigger than their boxes (or divs).
You did it well with the mobile menu, keep up the good work ! ✌️
Marked as helpful - @ArmsAndArrows@FlorianJourde
Hey @ArmsAndArrows !
Good job on this one !
I react about your description : I think I would have preferred to use
flex
instead ofgrid
property fro testimonials items. You could try something like that, instead :.testimonial { display: flex; flex-direction: column; align-items: center; gap: 6.3rem; }
And yes,
flex
can handlegap
property ! 🤯Also, do you know that you can set an anchor to hyperlink ? You can try it with your arrow element :
<a href="#features" class="hero__arrow"><img src="images/icon-arrow-down.svg" alt="arrow icon"></a>
Just set an ID to your
.features
section, maybe add a tinyhtml { scroll-behavior: smooth; }
to allow smooth scroll, and your page is now more dynamic, without adding any line of JS ! Pretty cool, huh ?Keep up the good work !
Marked as helpful - @Eduardo-Marque-s@FlorianJourde
Hey Eduardo !
Nicely done, your dark theme is working well !
Be careful, your responsive solution has some glitches : when screen size is very small (under
350px
), your layout begin to break. This is because of using fixedwidth
&height
on your.primeiro
an.box
elements. Of course, nobody have this size layout nowadays, but still, I think it's a good point to think "flexible" ! I would recommend you to avoid these fixed properties when you can, and just play around with paddings & margins.As well, it's a tiny detail, but I think it's a better practice to name CSS classes with English language. I struggled too, because of my native language, which is French, haha ! But when coming into big projects, you'll see it's easier to find your way if everything is written in English. I think this advice is valid for every code language you'll meet ✌️
Keep up the good job !
Marked as helpful - @Aliha7ish@FlorianJourde
Hey @Aliha7ish ! That's a good solution !
Be careful, your
.main-heading
goes behind your.main-header
when screen size is under700 px
! Maybe somepadding-top
could be added ?As well, do your know you can set a link with anchor on your arrow down ? Look at something like that :
<a class="arrow" href="#features-section"><img src="img/arrow.png"></a>
You'll be able to scroll down to the next section with this ID, just by clicking on the hyperlink element ! Just add a
html { scroll-behavior: smooth; }
, and you've got a nice scrolling effect really easily ! Pretty cool, huh ?One last thing : I think it's a better practice to put properties like
font-size
oroverflow-x
on thebody
tag, instead ofhtml
.But it's still pretty good, your responsive is also clean !
Keep up coding !
Marked as helpful - @VanelleD@FlorianJourde
Hey @VanelleD, good job with that one !
However, the main mistake for me in this challenge is the use of
<img>
, instead of setting simple<div>
withbackground-image
property in CSS.With your solution, you need to fix images sizes, although they're more like "decoration", in the current case.
For example, in your
.gallery
section, you could just use background images for each div, and set CSS property with something similar to that :.gallery .item { background-image: url('/image.jpg'); background-size: cover; background-positon: center; }
Maybe a small padding can be added, to set a kind of "minimal
height
/width
".With this option, your images are less "important" in term of HTML content, it will be easier to get a cleaner responsive, for example in your
.about-img img
, when screen size is≈ 800 px
, your.grid
will display more naturally !But your solution stays good ! Keep coding man !
Marked as helpful