[eluser]kezman[/eluser]
Hey!
I have a local project on CodeIgniter hosted on
My .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
My css file
Code:
.temp {
color: red;
}
My css file location
Code:
/application/views/css/mainpage.css
My Mainpage controller looks like this
Code:
class Mainpage extends CI_Controller {
public function index()
{
$this->load->helper('url');
$this->load->helper('html');
$data['content'] = 'Hey...we are on main one? really??';
$this->load->view('maintemplate', $data);
}
}
My maintemplate.php view file
Code:
<html>
<head>
<link rel="stylesheet" href='<?php echo base_url();?>application/views/css/maintemplate.css' type="text/css" media="screen, projection" />
</head>
<body>
<p class="temp">123</p>
</body>
</html>
But text is not red.
1. What's wrong?
2. Is my style of placing css files good?