Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

responsive using flex and media queries, no js used for hamburger menu

Dhananjay Sutwane•180
@Dhananjaysutwane
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Tharun Raj•1,330
    @Code-Beaker
    Posted about 1 year ago

    Hey there, congratulations on completing this amazing challenge. You've done an impressive work with this project! 🎉

    I would like to share some of my suggestions regarding your solution's code that might help you improve it.

    • Use classes for elements so that they're easier to style. Avoid using tag/element selectors for projects like this. Also, NEVER use id for styling elements.
    • Don't use vw for setting font-size, margins and padding. Instead use rem which is much better for responsive design.
    • Use CSS variables/custom properties for making your CSS more efficient and cleaner.
    • Use a modern CSS reset to make your CSS better.
    • Use more logical font-size for your content. For example, take a look at the "Transform your brand" section.
      • The size of the heading is too small.
      • The size of the link is equal or higher than that of both the paragraph and the heading.
    • The live website has a small horizontal scrolling. It might be caused by the inconsistent width of the flex layout. Instead try using grid. It is now a better way to create amazing and responsive layouts. Here is an example code snippet.
    .section-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    }
    
    • Make sure to use meaningful tags for your HTML. For the footer, use footer element instead of div.
    • Consider using the a tag for links like the website's logo in the navigation bar and the footer.
    • The layout on the mobile screen is broken and the readability is extremely poor due to the tiny font size.
    • There are two dimensions of the image provided with the resources which you should use with appropriate screen sizes. On the desktop, the site should load the larger image and on smaller screens, the site should load the smaller image. This will improve the performance of your website and the user won't have to download a large image on a mobile phone. This can be done using the srcset attribute in HTML. Here's an example code-block:
    <picture>
    <source media="(min-width: 50rem)" srcset="folder/DesktopImageFile"/>
    <img src="folder/MobileImageFile" alt="my image" />
    </picture>
    

    Resources 📚

    • Post by Grace Snow about the id selector 📕
    • Article from DEV Community 📗
    • Article from freeCodeCamp about CSS variables 📘
    • Learn how to create amazing layouts with CSS Grid by Kevin Powell 📕
    • Learn more about semantic HTML 📗
    • How to use srcset attribute to create responsive images 📘

    Hope this helps you 😄

  • Babalola victor ayomide•430
    @ZHADOW999
    Posted about 1 year ago

    Nice job ! but i recommend you use grid instead of flexbox to have more consistent size with each box

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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