Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 4 years ago

Blogr - Progressive enhancement dropdown and burger menus

P
Dave•5,295
@dwhenson
A solution to the Blogr landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have tried a progressive enhancement approach here on the menus, if JS fails:

  1. The burger menu won't activate and the top level links will simply remain visible at all times. The fallback styling is not perfect but it works.

  2. The dropdown menus remain as a hover activated list of links rather than the ideal situation of a click activated menu, with buttons that activate the drop downs.

I found this challenge more difficult than I anticipated.

I knew the navigation would be difficult, but I also found the layout of the sections in the main very difficult. In the end, I used grid to lay things out, but any suggestions for better approaches would be appreciated.

Any other comments, criticism and suggestions for improvement would also be very welcome. Cheers.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • ApplePieGiraffe•30,525
    @ApplePieGiraffe
    Posted about 4 years ago

    Hello there, Dave! 👋

    Good job on this challenge! 👏 It's nice to see you thinking about how your site will work without JS (that's something I haven't played around with much, but perhaps I should, sometime)! 😀 (BTW, I like the little animation you added to the hamburger menu.) 😉

    As for the overflow issue, I was just about to suggest something similar to pikamart's helpful feedback (using CSS grid and the overflow property). I think I encountered a similar thing in this challenge, if you'd like to take a quick look at the code (it was a long time ago, though, so I kind of forgot what I did). 😅

    Keep coding (and happy coding, too)! 😁

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted about 4 years ago

    @dwhenson Sure, I'll be glad to look into it again.

    Right now, like you said, mangled some codes but the section now is really great which is awesome.

    But now, to achieve like what you want, we still need to use overflow-x , since that cannot be achieved without using it, well for me. So set your main to overflow-x: hidden

    Now in order to get that, we need to make some calculations which we will need. Since your main section is supposed to have that 1440px width, which you declare on the grid. This time set it to grid-column: 1/ 4 so that it will take the whole size. But doing this will stretch it out especially when it is a large screen right. Well, in order to cap it, we need to add some paddings and calculate how much we need.

    The gist is, take the whole viewport, subtract it by the width that you want, which is 1440px, then divide the result by 2. We need to divide it by 2, so that we could apply the same size to both sides which will limit the size of the main.

    Since calc does not allow nested calculations. Make a variable, any name, let's go for "initial". Declare --initial: calc(100% - 1440px). Then in your main section, apply a padding of padding: 0 calc(var(--initial) / 2). Then try resizing now your browser and you will achieve that^^

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted about 4 years ago

    Hey, great work on this one.

    The desktop layout, well it appears there's a scrollbar at the bottom which was caused by the overflowed image and I don't know but here in my end, the second section's layout , you could say destroyed. Though the mobile state seems fine.

    This challenge was also hard for me when I did this but managed to complete it:>

    Suggestions would be:

    1. Since the first section's image is causing that scrollbar, you could add overflow-x: hidden in your main element. Also the dropdown icons in the menu bar is not appearing.

    2. I don't know what happened here, in the preview the second section is good, but here in my end, it is destroyed. The background which is the colored dark blue with rounded corner, it is only half, the text is in the bottom, which should not be the case since it must be in the left side. You might want to check that one out.

    3. Paddings. Adjusting those left and right side paddings will be really awesome like in the original layout.

    But still, really great job on this one. My solution on this, is not as good as yours compared to accessibility, but managed to layout it well, you could check it if you want and you can also give comment to it which will be really awesome.

    Great work^^

Join 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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub