Design comparison
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.
- Desktop view: Logo and navbar not on the same line.
- 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 :) ).
- 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?
- The hover state of the .svg social media icons is not working? (Is it todo with it being a .svg file?)
- 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
Community feedback
- @A-amonPosted almost 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 settingflex:1;
to your picture tags within instead of settingwidth:25vw;
. Then, on mobile, simply use a media query to change that toflex: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 helpful0@Joe-LindiePosted almost 3 years agoHello @A-amon,
Thanks for your help with aligning the navbar/logo - It seemed so obvious once you said it. I must have been staring at the code for way too long.
Thanks for all your other tips, too!
0@A-amonPosted almost 3 years ago@Joe-Lindie It's always good to take a break in between, just to clear our mental "cache" π
0 - To align the logo and navbar links, you can add this code to your
- @IEdiongPosted almost 3 years ago
- 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 helpful0 - Set a media query to change the layout of the
- @IEdiongPosted almost 3 years ago
Hi Joe, congratulations on finishing your second challenge here. A quick suggestion, try completing the
newbies
and some simplejunior
challenges as this would prepare you to handle the more difficult challenges.Possible solutions:
- 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 helpful0@Joe-LindiePosted almost 3 years agoHello @IEdiong,
Thanks for your help. Especially targeting the nth-child. It was driving me nuts!
@IEdiong I completed a newbie challenge and thought I'd push myself with a junior. It's is quite a jump. haha
Cheers!
1 - @martinelias1312Posted almost 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 helpful0@Joe-LindiePosted almost 3 years agoHello @smradupan ,
Thanks for the tip. That helped fix the issue of the gap.
I removed the id="egg-img" too as I was not using it.
0
Please log in to post a comment
Log in with GitHubJoin 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