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

Responsive Landing Page - Flex Box

Joe•60
@Joe-Lindie
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Good evening,

This is my second Frontend Mentor project, and it was a little too difficult for me. (I've only been studying since September)

There are several bugs I can't fix.

  1. Desktop view: Logo and navbar not on the same line.
  2. I used the nth-child CSS rule to change the color of the 'contact' tab in desktop view. It's not working. (I have the hover state working though :) ).
  3. In desktop & Mobile view I used flexbox to manipulate the images. I am getting a white gap on the rows. How do you remove it?
  4. The hover state of the .svg social media icons is not working? (Is it todo with it being a .svg file?)
  5. There is a problem with my JS for the hamburger menu. If you open the hamburger menu and change the screen size, you'll see what I mean.

I'm sure there are plenty of other issues, but for my second project, I don't think it's too bad. ALL feedback is welcome.

If anyone could help me fix these bugs, I'd appreciate it.

Lots of love to my web dev community,

Joe

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Amon•2,560
    @A-amon
    Posted over 3 years ago

    Hello! Amazing work there~ 😀

    I've got a few suggestions:

    • To align the logo and navbar links, you can add this code to your .nav-bar
    display:flex;
    align-items:center;
    justify-content:space-between;
    
    • I don't think you have set the hover state for your social media links/icons. Anyhow, I would usually use the SVG code itself instead of img for these since I can more freely change the icons' color. You can refer to this 😁
    • Looks like your .display-img images couldn't fit inside a row on laptop size. You can fix this by setting flex:1; to your picture tags within instead of setting width:25vw;. Then, on mobile, simply use a media query to change that to flex:100vw;.
    • For your .show navbar, you can use media query to override/reset .show styling on desktop sizes. 🖊
    • You should use <button> for the hamburger button since it's a well, button. 😂 I will let screen reader users to know it's one. Check this out 😉.
    • The 'Learn More' text should be links 🔗 instead so they should be using <a> tags.
    • The social media links should have a text telling screen reader users what each link is for. You can use the aria-label attribute on the <a> tags and set it to 'Facebook' or other values, then leave the alt attribute empty (This is what I would do 😀). You can check this out.
    Marked as helpful
  • Ediongsenyene Joseph I.•1,695
    @IEdiong
    Posted over 3 years ago
    1. Set a media query to change the layout of the .nav-bar.

    Some other things you should look into:

    • Look into the accessibility and HTML issues raised here.

    I hope this was helpful, Shalom!

    Marked as helpful
  • Ediongsenyene Joseph I.•1,695
    @IEdiong
    Posted over 3 years ago

    Hi Joe, congratulations on finishing your second challenge here. A quick suggestion, try completing the newbies and some simple junior challenges as this would prepare you to handle the more difficult challenges.

    Possible solutions:

    1. You can add the following CSS rules
    .nav-bar  {
       display: flex;
       align-items: center;
       justify-content: space-between;
    }
    

    from here you can add more rules to make it look as you want. 2. I believe you selected the contact with the nth-child correctly but you set the rules wrong, try this instead

    li:nth-child(4) {
        background-color: #fff;
    }
    
    li:nth-child(4) a {
        color: var(--Very-dark-blue);
    }
    

    this is because the rules set in the .nav-item a selector is more specific than the one you had set. For more info look up CSS Specificity.

    Marked as helpful
  • Martin Eliáš•890
    @martinelias1312
    Posted over 3 years ago

    Hello Joe,

    Some suggestions from me:

    gaps fixing:

    .Random-img { display: block; }

    .box{ display: block;}

    hover fix (works for me):

    .socials a:hover { }

    At your Egg image you used id="egg-img" for <img> and <source> element too. There should be just one unique id.

    Anyways good job on your second challenge! :)

    Marked as helpful

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.

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

Oops! 😬

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

Log in with GitHub