Good day, Campers
I’m currently working on the portfolio project and I have a few issues (currently) that I’m trying to resolve.
One: When I click a link in my navbar the selection will remain its active color (green) only while the mouse is held down. How do I keep it highlighted and how do I get it to change to the different links as I scroll to the corresponding sections of the page?
Two: How can I move my navbar links towards the center like in the FCC example?
Three: How can I get my page to scroll to the navbar’s respective sections, also like in the FCC example?
I’m trying to get all the functionality dealt with before I pretty everything up, so that’s why it’s so bare-bones, haha. If anyone have any other suggestions, I’m all eyes.
:active pseudo-class instead of
There are a few ways of going about this, but the simplest is just to add some
padding-left: <some_number>px; to the
From what I can see you already have that working, your page just isn’t long enough for it to be noticably visible. If you make the page long enough you’ll be able to see it.
Also, as a quick pro tip I highly suggest you take the time to learn about css Flexbox. It’s a set a of layout rules to make responsive designing MUCH easier. It’s takes some getting used to, but trust me it will make layout issues a thing of the past.
Thanks for all the help
padding-left was just what I was looking for. Thanks!
And I’ll be sure to check out Flexbox. Thanks again for the very informative answer.
While I have you here, might you have any suggestions for making my div background respond to changes in the window size like the example? I’m able to get my picture to jump down when I make my window narrow but the background doesn’t change.
That depends on what you mean by “background”. If you want the container around your “about” section to adjust to the image jumping lower, you just need to remove the height rule on your