Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Link to CSS not working
#1

[eluser]bondjp[/eluser]
I'm having a strange problem in my header.php.

Header.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;title&gt;&lt;?php echo $title; ?&gt;&lt;/title&gt;
    &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"/&gt;
    &lt;meta name="description" content="&lt;?php echo $description; ?&gt;"/&gt;
    &lt;meta name="keywords" content="&lt;?php echo $keywords; ?&gt;"/&gt;
    &lt;meta http-equiv="imagetoolbar" content="no" /&gt;
    [removed][removed] // After this line nothing happens...
    &lt;link type="text/css" rel="stylesheet" href="&lt;?php echo base_url();?&gt;css/default.css"   /&gt;

    &lt;style type="text/css"&gt;
        a:link {color:#6E9CFF;}
        a:visited {color:#6E9CFF;}
    &lt;/style&gt;

&lt;/head&gt;
&lt;/html&gt;

So i'm getting a blank homepage using the above code, but if i remove this line:
Code:
&lt;link type="text/css" rel="stylesheet" href="&lt;?php echo base_url();?&gt;css/default.css"   /&gt;

My homepage appears but i don't have the css...
I've checked the base url and it's ok and the file exits in that folder.
Can anyone point me to what is going on?
Thanks.
#2

[eluser]bondjp[/eluser]
Ok did a check and the problem is with base_url(), removing that and putting htt://localhost/ci/css/default.css works.
I've checked config.php and the base_url is correctly set.
Any ideas where to look further?
#3

[eluser]bondjp[/eluser]
Ok, found the problem, forgot to insert the url helper on autoload.php.




Theme © iAndrew 2016 - Forum software by © MyBB