Path to CSS doesn't work a second time |
[eluser]Phil Sturgeon[/eluser]
These are all good points but it can be done almost EXACTLY how you have it now, just use: Code: <link rel="stylesheet" href="/system/application/views/default/css/default.css" type="text/css" /> Notice the / at the front. As with others I don't agree with this method, but it is possible for you to sue it that way. You could take a look at my asset helper (link in my sig). That helps you store things in modules and use full CI paths that are generated dynamically. Id greatly recommend using that helper over any other method as hardcoded ones are a pain in the ass to update!
[eluser]John_Betong[/eluser]
[quote author="Zaatar" date="1194162394"]Oh, I'm sorry John, I didn't notice, apologies.[/quote] Hi Zaatar, Off topic! Referring to your second point about inserting variables inside double quoted strings, this is the reason and also it is easier for me to debug my frequent typos Single Quotes versus Double Quotes Quote:// http://www.evolt.org/these-things-i-know-php-tips Cheers, John_Betong
[eluser]Phil Sturgeon[/eluser]
I knew it! I always thought singles were probably faster but never knew why. Once again my psychic powers do me proud.
[eluser]Unknown[/eluser]
I have used Code: <link href="<?php echo base_url();?>/default.css" rel="stylesheet" type="text/css"> kept default.css in htdocs\CodeIgniter folder. and it works
[eluser]Unknown[/eluser]
Code: <link href="<?php echo base_url().'css/style.css';?>" rel="stylesheet" type="text/css" /> |
Welcome Guest, Not a member yet? Register Sign In |