简体   繁体   中英

How to link css to html with this pathway (image)

Pathway image

I would like to link style.css to my to my html page ATC1O.html. I added more periods after 'href="' but that is not working. Is there a way to link this at all?

 <link rel="stylesheet" href="../css/style.css"> 

Try "../../css/style.css" or "../../../css/style.css".

It's kind of hard to know how deep ATC10.html is from your image. All I know is that its not the direct parent.

try the following:

<link rel="stylesheet" href="./css/style.css">

more info here

../../../css/style.css

./ represents current directory, so this is dance

../ represents the parent directory, so this will be art

../../ represents Parent's parent directory, so document

../../../ represents Parent's parent's parent directory, which you have not shown in the image, but it contains the "document" the "css" directory. So we go into it and then choose the /css/style.css file.

Hope It isn't confusing!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM