![]() |
Images, CSS, JS disappear on any controller, but home page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Images, CSS, JS disappear on any controller, but home page (/showthread.php?tid=33572) Pages:
1
2
|
Images, CSS, JS disappear on any controller, but home page - El Forum - 09-01-2010 [eluser]Met[/eluser] and dont forget the widely unused <base href="<?php echo base_url(); ?>" /> tag in the <head> means you can use relative links in views/content with out this problem from occuring. also makes it much more portable Images, CSS, JS disappear on any controller, but home page - El Forum - 09-01-2010 [eluser]Zelf[/eluser] [quote author="cahva" date="1283367534"]Pickupman's example didnt work as the url was wrong if this is used from your localhost where the site starts from "mysite". So the correct would have been: Code: <link href="/mysite/global_assets/templates/default/css/body.css" rel="stylesheet" type="text/css" /> There it is! Works perfectly now. Thanks for the info. |