I am working on a codeigniter project. I am having a problem about css. the css are included in the header in the following fashion:
<link href="http://localhost/ebookazine/assets/css/reset.css" rel="stylesheet" type="text/css" />
<link href="http://localhost/ebookazine/assets/css/typography.css" rel="stylesheet" type="text/css" />
<link href="http://localhost/ebookazine/assets/css/FlashStatus.css" rel="stylesheet" type="text/css" />
<link href="http://localhost/ebookazine/assets/css/webshop.css" rel="stylesheet" type="text/css" />
but no css links are working. someone help about this?
First of all, check if your .htaccess file looks something like this (especially the
|assets|part is important):This allows that the files inside your
assetsfolder can be accessed by public.Next, make sure that the paths inside your view use the
base_url()command, e.g.:With that, the view will always use the correct absolute URL, no matter if you are testing it on your local machine or on a webserver.