• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot load CSS, loads inside HTML tags

#11
[eluser]CroNiX[/eluser]
Why are you including "index.php" in the url to your assets? They are regular files which aren't processed via CI...

So it's trying to access one of your CI controllers, which obviously doesn't exist and you get the 404.

Try just using
Code:
<link rel="stylesheet" href="/assets/css/basicLayout2.css" type="text/css" media="screen, projection" />

#12
[eluser]TWP Marketing[/eluser]
I think CroNix nailed it.

#13
[eluser]CroNiX[/eluser]
You'd need to post your .htaccess if that doesn't work.
Also, echo out the $_SERVER array from the top of your index.php and post the results.

I'd highly recommend looking into how to set up a virtual server in Apache so each of your projects would have it's own DOCUMENT_ROOT and also have a unique url that doesn't include the "project" directory, like "http://myproject.localhost", instead of "http://localhost/myproject". It also saves a LOT of time when developing/troubleshooting, as your working environments will be the same on both servers, your htaccess will be the same, your CI configs, etc.

#14
[eluser]Stergios[/eluser]
Guys problem solved!! I used this:

Code:
<link rel=stylesheet href="<?php echo base_url(); ?>assets/css/basicLayout2.css" type="text/css" media="screen, projection">

It just needed the 'media' thing. Oh such a problem wasted 3 days!!

Thank you for your time. I'll come back with new questions on CI.
Thanks!!!

#15
[eluser]Aken[/eluser]
The media parameter is not required for CSS. It will automatically apply to all if it is not specified. Not sure why that would've been your problem... You should also have double quotes around your rel="stylesheet".

#16
[eluser]Beginers[/eluser]
ops close!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.