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

Responsive layout using CSS Grid & Flexbox & little bit of JS

P
Katrien Schuermans•1,420
@katrien-s
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Gosh, I struggled on this one. And also applauded myself various times. I'm delighted with the result, but nevertheless I have a list of mistakes/errors I don't know how to solve. I didn't finish this excercise in one day. I'm working full time, juggling a few extracurricular activities, so time is limited. It made me loose oversight, which I handled by using a to do-list. So this solution in my head, feels messy.

The issues I didn't manage to solve:

  • The size of the images inside the main grid are off on tablet view. I assumed it had to do with me setting a max-width: 100%. But when I changed that, I still couldn't fix the height. How would I solve this?
  • The nav-toggle didn't wanted to disappear if I would set display:none so I had to use visibility: hidden. But why didn't the display:none not work?
  • The contact-button on the sidebar doesn't want to change its colours on hover. Yet it does on click?
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Grace•32,130
    @grace-snow
    Posted about 3 years ago

    Hi

    This looks good on my mobile but there are several important accessibility lessons you need to learn

    • a logo should not have an empty alt. It’s possibly the most important content on the whole page - tell me what this site/product is called
    • you must never ever attach click event listeners to non interactive elements. With a nav toggle, it needs to be a button inside the nav element. That button needs to have an aria-expanded attribute that toggles on click and preferably an aria-controls attribute pointing to the ID of the list it is toggling. It also needs accessibily labelling (eg with sr-only text inside the button like “toggle navigation”)
    • there is rarely if ever a need to repeat html. You should be able to use the same nav html for mobile and desktop. And it should not be in an aside (I’m not even sure it’s valid html to have an aside landmark inside a header landmark tbh)
    • I would consider the testimonial people images valuable content. They deserve their name in the alt. The 4 image grid at the bottom looks decorative though so I’d leave those alts blank
    • consider how you could make the testimonial markup more meaningful. Perhaps a blockquote? You could put this in a figure and wrap the persons name and image in a figcaption (although figcaption semantics aren’t that widely supported). Alternatively you could put the persons name above their blockquote in the html but reorder it to visibly sit underneath with flexbox order. Just ideas
    • it’s essential that those social links are accessibly labelled. Again sr-only text would be good here
    • as social links usually take you away from the site you’re on it’s worth adding target _blank to open them in a new tab. When you do that make sure you also add rel=“noopener” for security reasons
    • as you only need a few tiny icons, it’s probably worth downloading them as svgs for this challenge rather than importing a huge icon library (if they are not included in the starter files)
    • speaking of starter files, it’s best to use these as the base for your project. I can see you’ve removed the gitignore file which is important to keep in most repos. That’s how DS Store has ended up in there (not a problem, just unnecessary) but it will become a huge problem later on bigger projects If you forget to ignore node_modules or a similar directory that doesn’t belong in git.

    I hope these tips are helpful

    Marked as helpful
  • Victor•1,035
    @CodeVee
    Posted about 3 years ago

    @graficdoctor. Great job on this project. I have a few comments:

    • There is a need for more spacing between sections
    • Also the grid was switched around. I don't know if that was a creative choice. If it was an issue then I could give a few suggestions on that.
    • The hover is working on chrome
    • There were also alignment issues.
    • The struggle of doing this with a full-time job is highly applauded.
    • I'd recommend using the Figma design and sectioning the project for your to-do list.

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.

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