html is displayed on the web, but css is not reflected

Asked 1 years ago, Updated 1 years ago, 260 views

<link rel="stylesheet" href="https://hideto7007.github.io/portfolio/portfolio_styl.css" type="text/css">

I changed it to , but css is not reflected on the web.How should I change the code to reflect it?
Please let me know.

There is a code at the link below.
https://github.com/hideto7007/portfolio

css github-pages

2022-09-30 21:54

1 Answers

As seen from index.html, the affected CSS is in the subfolder, so

index.html
│
└ portfolio/portfolio_style.css

The correct URL for the CSS file to be referenced should be:

https://hideto7007.github.io/portfolio/portfolio/portfolio_styl.css

Check out the relationship between repository data and publishing it on the GitHub page.

If you find it difficult, first place everything in the same folder without creating a subfolder, or
The description in HTML may be relative path.

<link rel="stylesheet" href="./portfolio/portfolio_style.css" type="text/css">


2022-09-30 21:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.