I can not get the path to the .css files right

1

I have the following structure for a project:

And I can not get the css styles loaded. If header.php is inside includes and CSS files inside css why does not it work ../css/style.css ?

What route do I have to put?

/css/bootstrap.css

    
asked by Rafael Hernández 12.10.2016 в 08:08
source

1 answer

6

You have a route problem. If you look at the one you use for the logo5.png image, it's images / logo5.png but the .css is putting it at the same level as the image directory. Just remove ../ from the ../ css / bootstrap.css path and keep only css / bootstrap.css and that will work.

You are probably using a include ('includes / header.php') within your index.php file and that is why the image path is correct and that of your css is incorrect because by including the header.php markup within index.php with the include () function, you are putting what is in header.php within the level of index.php

EDITED In the case of continuing to have the error the following probable cause would be the privileges of access to the file. I recommend assigning the corresponding permissions (depending on your operating system) to be able to discard the error.

    
answered by 12.10.2016 / 08:21
source