![]() |
CSS path not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CSS path not working (/showthread.php?tid=41655) |
CSS path not working - El Forum - 05-13-2011 [eluser]cavancola[/eluser] Hi guys in my views i have a page called db_view.php and my link to my css file is <link rel=“stylesheet” href="<?php echo base_url(); ?>css/styles.css" type=“text/css”/> where my css folder is at the top level of the codeigniter folder... in page source the link works fine http://localhost/xampp/codeigniter/css/styles.css" but still wont pick it up!! any help appreciated. S CSS path not working - El Forum - 05-13-2011 [eluser]Atharva[/eluser] Does the css page loads when you run this url in ur browser : http://localhost/xampp/codeigniter/css/styles.css CSS path not working - El Forum - 05-13-2011 [eluser]cavancola[/eluser] it does indeed.....can't understand why it wont load from views page!! CSS path not working - El Forum - 05-13-2011 [eluser]osci[/eluser] what does base_url echoes? It doesn't echo http://localhost/xampp/codeigniter/ are you using virtual directories? if not it would be echoing http://localhost/ or http://localhost/xamp/ (I'm not familiar with xamp or wamp) set in config.php Code: $config['base_url'] = 'http://localhost/xampp/codeigniter/'; or (my choice) create a virtual directory to get you closer to production servers. |