Welcome Guest, Not a member yet? Register   Sign In
Not strictly code igniter... linking multiple css files in a page header.
#4

[eluser]Phil Sturgeon[/eluser]
That will work only in your default controller. The second you go into any controller or method it will be looking for:

Quote:controller/method/styles/reset.css

You need to use a absolute path or an absolute URL instead of these relative paths you have in your example.

To do this, try:

Code:
<link rel="stylesheet" href="/styles/obst.css" type="text/css" media="screen" title="no title" charset="utf-8" />

or

Code:
<link rel="stylesheet" href="<?=base_url();?>styles/obst.css" type="text/css" media="screen" title="no title" charset="utf-8" />

Just to note, this is not a strange CodeIgniter issue. It is generally a bad idea to use relative paths to load anything on the web if you are using / in your URL's. Every / thinks it is a new directory, and so the current location changes breaking relative paths.

Take a look at my Asset library/helper to get some shorter syntax for this.


Messages In This Thread
Not strictly code igniter... linking multiple css files in a page header. - by El Forum - 09-11-2009, 05:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB