Welcome Guest, Not a member yet? Register   Sign In
CSS path not working
#1

[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
#2

[eluser]Atharva[/eluser]
Does the css page loads when you run this url in ur browser : http://localhost/xampp/codeigniter/css/styles.css
#3

[eluser]cavancola[/eluser]
it does indeed.....can't understand why it wont load from views page!!
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB