Welcome Guest, Not a member yet? Register   Sign In
weird problem with css
#1

[eluser]gigas10[/eluser]
I'm having an extremely weird problem, I make a new folder in the root directory, called css. I dump a css file in their, and call it from one of my views like this.
Code:
<link href="<?=base_url();?>css/default.css" rel=stylesheet" type="text/css" />

But the stylesheet is not loading, and when I goto, http://localhost/MERS/css/default.css it acts like I'm calling a controller or something and says not found. Its weird because when I dump the css file in a folder called images, which is in the same directory as my css folder, the root directory, and call it from there:
Code:
<link href="<?=base_url();?>images/default.css" rel=stylesheet" type="text/css" />

The style sheet loads just fine. What is going on here? I've tried renaming the folder, moved it around, I can't seem to figure this out.
#2

[eluser]Dam1an[/eluser]
I assume yoiu're using a htaccess to get rid of index.php?
Chances are you have it so requests for the images directory don't get rerouted, but you havn't added css to that list

Mine is
Code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico|license.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
#3

[eluser]gigas10[/eluser]
lol ty




Theme © iAndrew 2016 - Forum software by © MyBB