Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • potato58 30

    @potato58

    Submitted

    This was my first time creating a burger style menu. I am unsure of the method I used for greying out the page when the menu is visible - is there a way to grey out the entire page (i.e if the page is scrolled down) beyond the visible area?

    @exitsimulation

    Posted

    I think your method is perfectly fine. Since it's a <div> that's positioned with absolute and scaled to the full page dimensions you won't need to worry about it scrolling past the visible area. I will always cover the full viewport. For the mobile version of this challenge I created a top bar that is sticky, so that users would have access to the burger menu from anywhere on the page. Maybe it's worth a consideration

    Marked as helpful

    1
  • @EduardIonescu

    Submitted

    On my last challenge I got advice to use rem instead of px, but should I do that for everything, or should some things be in px (font-size / width etc) ?

    @exitsimulation

    Posted

    There are several advantages to using the rem unit over the px unit in CSS. First, the rem unit is relative, which means that it scales based on the root element of the document, whereas the px unit is an absolute unit of measurement that does not scale. This makes the rem unit more flexible and easier to work with, especially when creating responsive designs that need to look good on a variety of different screen sizes.

    Another advantage of using the rem unit is that it makes it easier to create consistent sizing across different elements on a page. Because the rem unit is based on the root element, you can use it to size elements relative to the base font size, which is specified on the <html> element. This makes it easy to ensure that all text on a page is consistently sized, regardless of where it appears in the document hierarchy.

    Additionally, using the rem unit can make your CSS code easier to read and maintain. Because the rem unit is a relative unit of measurement, it can make your CSS code more self-contained and easier to understand. This can be especially helpful when working on large, complex stylesheets with many different elements and styles.

    Overall, the rem unit offers a number of advantages over the px unit, including greater flexibility, consistency, and readability in your CSS code.

    1