if you want to include css in your html, you need to put them in your public folder instead of src folder and use '%public_url%' as the path to your css. so it would look something like this:

<link href="%public_url%/homepage.css" rel="stylesheet" />

but, it is highly recommended that you do import the css that you want inside your react component, because your css would get minified and bundled. so you could do something like:

import react, { component } from 'react';
// ... rest of imports
import './path/to/css/homepage.css'

for more info on this, go to the documentation here.


the problem is likely with the location of your files and the way in which you're referencing them. for example, is my_resume.pdf in the same folder as index.html? is homepage.css also in the same folder?

the prefix / is relative to the root directory.

the prefix ./ is relative to the working directory.

the prefix ../ is relative to the parent directory.

for further information regarding relative and absolute urls, i recommend checking out coffee cup's article on the topic.

hope this helps!


cameron payton ! can you using relative paths for it. instead you use absolute paths. example: http://your-domain/homepage.css and http://your-domain/views/icons/resume_logo.png

i think it will help you. please get back to me. thanks !


in your html file all you need to do is a normal link statement

<link href="" rel="stylesheet" integrity="sha384-1l94safxwavew88rkprz8r28eqmvt7kg9ux3ddcqya/p3cflntgqzmnyaua49pl2" crossorigin="anonymous" />

like so that one is from a website but you can do the same thing with a local one like

<link src="/styles/maincss.css" rel="stylesheet" /> 

that will work

Related Query

More Query from same tag