Search code examples
cssgithub-pages

Github not showing correct CSS file


The file structure in my GitHub repo is

--root
index.html
resume.css
--folder assets
    resume.css

(yes I made two identical css file just in case one of them works but none of them works...) I tried to reference css file as

<link rel="stylesheet" type="text/css" href="resume.css" media="all" />

or

<link rel="stylesheet" type="text/css" href="assets/resume.css" media="all" />

But again none of them works.. When I download the entire GitHub repo as a .zip file on my computer and unzippit, the website can display normally. Is it something else I could do?

The webpage shows on my local file enter image description here and webpage on github enter image description here


Solution

  • Can you check where you placed the <link> tag? It should be inside the <head> tag

    EDIT:
    

    You can move highlighted section in here to parent <head> tag and remove <head> tag inside <div> tag