Link to CSS not showing up on my Git Hub gh-pages - html

For some reason my CSS is not showing up on my Git Hub page.
I read through some of the stuff that has been posted in the past but it don't seem to work.
Also, I have another project that I am working on shows up but for this particular project nothing is showing.
Could it be something wrong with my link tag?
<link rel="stylesheet" type="text/css" href="css/styles.css">
Please help.

Related

Why does the Github Pages not use my CSS archive?

I'm trying to host my page on Github Pages but it is not recognizing my CSS file. I've tried changing the names, rearranging the folders and it still doesn't work. Does anyone know what can I do?
Here is my GitHub project.
I tried change the folder names, and putting the CSS file in the main folder.
Your index.html file is on the same level as your css folder. You'll need to remove ./ from ./css/style.css and you should be fine.
EDIT: I just checked it out and it looks like the CSS is loading.
Your github page
If you change your CSS link from
<link rel="stylesheet" href="./css/style.css">
to
<link rel="stylesheet" href="css/style.css">
I think your css wil work, happy coding!

github pages doesn't display css for index.html but display for others

I read different questions on stackoverflow regarding this issue but i haven't got any solution for my case, the rest of my pages are displaying css well, but index.html doesn't display.
But surprisingly when i run my project locally it works very well.
What am i missing?
My github pages link :
https://huxaiphaer.github.io/-Ride-My-Way/index.html
My github project link , in the branch gh-pages:
https://github.com/huxaiphaer/-Ride-My-Way/tree/gh-pages
Your href was wrong for your css import. You were navigating up more folder.
<link rel="stylesheet" type="text/css" media="screen" href="UI/css/index.css">

Beginner: CSS and HTML working in Atom but not in GitHub

Total beginner here looking for plain English answers :)
I managed to successfully link my HTML and CSS sheets when using Atom and viewing the files in my browser, but now I'm trying to get this into my GitHub pages website and I can't make it work at all!
Here's the HTML: https://github.com/isbonnici/isabellabonnici.github.io/blob/master/index.html
Here's the CSS: https://github.com/isbonnici/isabellabonnici.github.io/blob/master/CAstylesheet.css
What am I doing wrong? Really would appreciate the help here.
There is no css folder in your github account. Remove css/ from the css path. It should start working. Change
<link rel="stylesheet" type="text/css" href="./css/CAstylesheet.css">
to
<link rel="stylesheet" type="text/css" href="./CAstylesheet.css">

CSS changes shows up in eclipse but not on browser

I have an index.html file and index.css. The directory structure is:
img of directory structure
I am linking the css to html with : link rel="stylesheet" type="text.css" href="css/index.css"
I am using tomcat v8.5 to host. When I run my project on server I see this in the window within eclipse:
browser displayed within eclipse
However when I open up chrome/firefox and search, it is only pulling the index.html and the css is not being displayed :(
I read that files have to be specified with "relative path", however, the folder containing index.css is in the same directory(WebContent) as the index.html. So what is the issue with href="css/index.css" ? Can someone please help me with the path issue?
Thanks so much for your time !
There is a slight mistake in the link tag. Replace type="text.css" with type="text/css":
<link rel="stylesheet" type="text/css" href="css/index.css">

css not loading on some computers

I'm using html and css for the first time. On one computer the html refers to the css appropriately, but on another the css is not referred to at all. I think I'm linking to the css correctly in the html:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
On both computers, I'm using the latest version of Firefox.
Any thoughts as to where I'm going wrong?
Thanks in advance.
Are you using your browser's developer tools?
Right click in Firefox and go to "Inspect".
Find the Web Console tab. There you will see if the reference to the css file is valid or if it returning a 404, not found.
Also, your reference should be href="/css/mystyle.css", to keep a clean root directory of the site.
Also, you might want to self close the tag:
<link rel="stylesheet" type="text/css" href="/css/mystyle.css" />
And if that doesn't help, run your code through the w3c validator: http://validator.w3.org/