Good evening,
I started using Codeigniter as Framework for my newest projekt... and already got problems on the first page.
I want to link a CSS file to my site. It looks perfectly good in the Code. But just nothing happens.
<html>
<head>
<title>Tec.Net</title>
<?php
$this->load->helper('html');
echo link_tag($data['css']);
?>
</head>
<body>
<h1><?php echo $title ?></h1>
This is the code of my header.php
body {
background-image: url("application/views/images/Console Background.png");
color: white;
}
The standard.css
<html>
<head>
<title>Tec.Net</title>
<link href="localhost/TecNet/standard.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Home</h1>
<h2>this is a home site</h2> <em>© 2015</em>
</body>
</html>
And at last. The code i receive from Firefox. The Link is perfectly fine. If i try to access it directly from my browser it opens the css file. As inline CSS the code works perfect just that link refuses to work
EDIT: my URL Structure for the controller.
http://localhost/TecNet/index.php/tecnet/view
And the controller itself
<?php
class Tecnet extends CI_Controller {
public function view($page = 'home')
{
if ( ! file_exists(APPPATH.'/views/pages/'.$page.'.php')) {
// Whoops, we don't have a page for that!
show_404();
}
$data['title'] = ucfirst($page); // Capitalize the first letter
$this->load->view('templates/header', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);
}
}
?>