Assessment wanted for Fundamental Layout Comprehension task

Hello! Need assessment for Fundamental Layout Comprehension task.

Source code, Github Pages.

I tried adding support for older browsers with float for article and aside. And added drop-down menu in nav.

I have one a little bit problem whith drop-down menu. It dont work correctly on mobile because mobile dont have mouse.

Hi @VladimirK

Excellent work on this task and your additions! :tada: Cool fallback strategy for the grid!
One way to making the drop-down work on mobile would be to create a media query for mobile where the sub menus are always visible. But this would only be a good idea if there aren’t too many entries.

left: 0; on the nav can be omitted since we have no horizontal scrolling.

Maybe an easier method to make the photos work would be a grid with grid-template-columns: 1fr 1fr;

Have a nice day!
Michael

1 Like

Thanks, @mikoMK!! I added flex to photos for good visible in mobile and tablet versions without any changes in media queries.

tablet (middle width viewport):

mobile (small width viewport):

Two questions.
In my example i have grid media query for min-width: 974px but

in Chrome inspector i have (grid media query ON):

In Chrome responsive mode min-width = min-width from media query:

  • Width from inspector ignore scrollbar width?

  • Scrollbar is part of viewport (17px) and for dekstop version media query i need to use width from inpector (not from responsive mode) + 17px of scroll bar. Right?

Firefox dont ignore scrollbar width:

1 Like

Ah, I see that makes sense. May I offer you an improved grid version which behaves similar to your flex code, but also gets rid of the whitespace to the right of the elements:

display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));

This does the following:

  • Puts as many 150px images on the same line as there is space for it.
  • Expands those images evenly until all the remaining whitespace is used

Yes, there are differences with counting scrollbars. In the end it shouldn’t matter too much as we are trying (in general) to build robust layouts where some small pixel differences won’t destroy it. That’s the challenge :slightly_smiling_face:

I hope that helps!
Cheers,
Michael

2 Likes

Ok, thank you! Grid looks more simple.

You mean this whitespace?

1 Like

Yes, in this case the images would just get wider to fill the whole column until there is enough space to fit two 150px images side-by-side.
I wouldn’t say grid is simpler or meant to replace flex. They both have a reason to exist. This photos example may be a case where both are reasonable.

Michael

2 Likes

Hello everyone! I remake Fundamental Layout Comprehension version of the page.

Repository with sourse code, GitHub Pages.

1 Like

Wow! That’s so cool! :star_struck:

The theming with the switcher and the animation, the build system, Pug, the mobile menu, … Just amazing :grinning:

1 Like