How to fix drodown menu in react


Question 1.) When hovering cursor over ‘work’ in navbar, the div dropdown appears far away from ‘work’. Can anyone help me solve this so it appears directly underneath ‘work’? the files involved are all contained within 0.5 - Navbar2 folder

Question 2.) Why cant i roll my cursor over drop down to select a page to navigate to?

Git repo: GitHub - DeBoer753/m-photography-PROJECT

When trying to run your application:

“Module not found: Error: Can’t resolve ‘/Users/myles_deboer/Desktop/Desktop 2.0/Coding/Photography/m-photo-project/src/imgs/paper2Img.jpg’ in ‘/home/bbsmooth/test/m-photography-PROJECT/src/components/4-Reviews’”

You need to use relative paths in your CSS. Most people aren’t using the exact same directory structure that you are on your computer :slightly_smiling_face:

hmm, dang. What about now? I pushed new code and I think I fixed it.

Ive fixed the div from being too far away, but am still having trouble with clicking the drop down menu when the hover activates the div of photography, social media, and video. It just dissappears when I try to click one.

Now I’m getting this error when trying to run the dev server:

“Module not found: Error: Can’t resolve ‘…/…/imgs/linkedInIcon.png’ in ‘/home/bbsmooth/test/m-photography-PROJECT/src/components/5-Footer’”

It’s because the image’s real name is linkedinIcon.png with a lower case i for in.

I’m not trying to be a jerk here, but if you want people to help you, you should make sure that your project builds correctly.

Wait thats strange, my images file show LinkedInIcon with uppercase ‘I’ for ‘in’.

And if i copy and paste the imports to the relative path my project breaks.

like this instead (relative path)(This now breaks my app): import linkedIn from `src/imgs/linkedInIcon.png`

vs this originally which still works: import linkedIn from '../../imgs/linkedInIcon.png'

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.