I’m learning HTML and CSS.
My problem here is that he latest HTML classes I made can’t be found in CSS. All other classes work just fine.
The classes that I can’t find in CSS are “center-column” ; “links-wrapper” and “right-column”.
So, I can type it in CSS, but it is flagged as a problem code and it doesn’t work.
Visual Studio Code normally gives autocomplete suggestions while typing. But the suggestions for those 3 class items don’t appear in CSS.
Okay, now it suddenly does work. CSS finds the code without problems now.
Only a very weird thing. It doesn’t find “nav-link” anymore.
So now it finds the other 3 things perfectly fine, but doesn’t find nav-link, which it found without a problem before.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Well, your .nav-link elements are not a direct descendants of .links-wrapper.
Change this line .center-column > .links-wrapper > .nav-link
to .nav-link and it will work.
And this is not a good idea at all to use such constructions to access your HTML.
What’s the reason behind it?
You have div element with nav-link class, so use .nav-link and so on.
This will prevent similar problems and your CSS will be readable.
I do it because I’m following an online course and the person who made that course said that you might want to style different nav links on different pages in a different way.
He wants to show what to do when you deal with a very complex website.
But thank you for your answer.
I will change it to .nav-link.
Just one question, I thought it was a direct descendant of .links-wrapper.
What am I interpreting wrong?
first, make sure that your css slector is specific enough to target the elements you wnat to style. if there are other css rules that have higher specificity or are being applied later in your stylesheet, they might override your styles.
secondly, make sure that the “Ubuntu Condensed” font is correctly installed on your system or is being loaded from a remote source. if the font is not available, the browser will use a fallback font, which might not match your expextations. @jensvl92
or sometimes, changes to your css file may not be reflacted immediatly due to browser caching. try clearing your browser cache or using a hard refresh (Ctrl + F5 or Cmd + Shift + R) to ensure that you are seeing the latest version of your styles.