1

I have two folders in my website. My directory structure like this: enter image description here In my file inside Cidadao I want to get a file from assets.

I am trying code like this:

<link rel="stylesheet" href="site/assets/plugins/bootstrap/css/bootstrap.css">

but this is not working.

3 Answers 3

1

Try

<link rel="stylesheet" href="../assets/plugins/bootstrap/css/bootstrap.css">
0

you just have the path incorrect.

it should be <link rel="stylesheet" href="/site/assets/plugins/bootstrap/css/bootstrap.css">

Or you could try <link rel="stylesheet" href="/assets/plugins/bootstrap/css/bootstrap.css">

Or you could also try <link rel="stylesheet" href="../assets/plugins/bootstrap/css/bootstrap.css">

one of those above 3 should work, / are important when it comes to filepaths.

0

To get from inside a folder to one level up, use ..

This is not confined to HTML though; all computer languages work like that. (Some need the slashes to be the other way around, but the principle is the same throughout.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.