Github won't update the css part of my page

Tried merging, pushing, etc nothing seems to work. Any idea what it could be? It seems to me that it doesn’t accept my css for some reason…
The github link is:

when I look at it in my browser, through VS code (“go live” option), it works the way I want it to, but when I go to Github and click on the link of the page, even after pushing it, it doesn’t work.

Btw, I started this project on my terminal and half-way through it, I switched over to the terminal in the VS code. Any thoughts if that is ok or not? any help will be much appreciated!!!

please forgive my question but I literally just started using Github yesterday.

Thanks,
Leo

Hey @leoragazini,

So there are a couple things going on here.

  1. Instead of using an absolute path in your HTML, try using a relative path.

    That is, instead of:
    <link rel="stylesheet" href="/resources/css/style.css" />
    Do (note the dot at the beginning of href):
    <link rel="stylesheet" href="./resources/css/style.css" />

  2. The “go live” feature in VS Code launches a local server for your project. The webpage that opens is probably something like 127.0.0.1:3000 or localhost:3000. Here, 127.0.0.1 and localhost both refer to your device, instead of a website like codecademy.com. The number after the colon is the port that is listening for data from your repository (that is, your HTML, CSS, and so on). This is probably why the absolute path works on your machine, but not on GitHub.

    When I go to the repository you’ve linked, I don’t see a link that I can click on to view the website, can you point us to that link? EDIT: Never mind, found it :slight_smile:

  3. The terminal in VS Code is the same as the terminal on your machine (I assume you’re on a Mac?). The only caveat is that when you open a new terminal in VS Code, it’s a fresh terminal. This means if your repository requires a virtual environment, you’ll need to activate it again in VS Code. (If that doesn’t make sense about the virtual machine, don’t worry about it for now, haha).

Working with Git and GitHub can be confusing at first, so no need to apologize for your question. :slight_smile:

1 Like

Hi there,

Thank you very much. It was all about the relative/absolute path in my HTML. I just don’t quite understand why in the “follow through” video explaining the project, the man showing it uses an absolute path instead of relative and it still works… But anyway, that’s something for me to read about and make sense of it next and it’s now in my to-do list hehe

THANK YOU very much for your help!!!

Not a problem, glad we figured it out! :slight_smile:

1 Like

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