css files not displaying in apache2 server
I have added a css stylesheet into an html page(.php extension though) but the css isnt being loaded onto the page.
I am using ubuntu 12.04 desktop with apache2
the css file is located inside of my var/www folder and here is the line of code linking to the stylesheet.
I've tried many different combinations such as var/www/styles-blue2.css , ../var/www/styles-blue2.css
<link rel="stylesheet" type="text/css" href="./styles-blue2.css" >
1. If the CSS file in the same directory as the PHP file no path is needed.
2. If the CSS file in the root directory of the site, prefix the file name with "/",
3. If the CSS file is in a child directory of the PHP file, prefix the file name with "<child>/". E.g. href="css/styles-blue2.css"
4. If none of the above, give the path from the root.
I think 2 is what you need, but that depends on whether "www" is the root directory (it usually is).
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread