04-09-2010, 02:29 PM
[eluser]mihaibaboi[/eluser]
Hello,
I hope I'm not starting a new topic for nothing. I had a look around and couldn't find anything that matches my problem. I guess it's a very trivial problem, but there's something I'm missing. Here's the problem. I've set up CodeIgniter like this:
D:\work\php\www\codeigniter\ (where "D:\work\php\www\" is the document root on my local server)
I have a view file located at D:\work\php\www\codeigniter\system\application\views\layout.php
I want to set up an external css file that's located in D:\work\php\www\codeigniter\system\application\views\css.main.css
To do that wrote:
The problem is that it refuses to apply the styles that I wrote in my css file, and when I inspect it with FireBug, the <link> tag has a 404 error. I also tried writing it like this:
because I figured that it would be relative to the index.php file in the codeigniter folder. It didn't work. Any ideas?
Sorry for the long post, but I wanted to provide you with all the details that I thought might help.
Thanks
Hello,
I hope I'm not starting a new topic for nothing. I had a look around and couldn't find anything that matches my problem. I guess it's a very trivial problem, but there's something I'm missing. Here's the problem. I've set up CodeIgniter like this:
D:\work\php\www\codeigniter\ (where "D:\work\php\www\" is the document root on my local server)
I have a view file located at D:\work\php\www\codeigniter\system\application\views\layout.php
I want to set up an external css file that's located in D:\work\php\www\codeigniter\system\application\views\css.main.css
To do that wrote:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My layout page</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
The problem is that it refuses to apply the styles that I wrote in my css file, and when I inspect it with FireBug, the <link> tag has a 404 error. I also tried writing it like this:
Code:
<link href="system/application/views/css/main.css" rel="stylesheet" type="text/css" />
because I figured that it would be relative to the index.php file in the codeigniter folder. It didn't work. Any ideas?
Sorry for the long post, but I wanted to provide you with all the details that I thought might help.
Thanks