css not loading in codeigniter

夙愿已清 提交于 2019-12-06 12:57:48

Also make sure that the directory is not "blocked" by the .htaccess file, if you are using it to remove index.php

RewriteEngine on
RewriteCond $1 !^(index\.php|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Personally I would move the css diectory into an assets directory:

/assets/css
/assets/js
/assets/img

the default location for css files is the same level as the application i.e.,

/css
/application

Check the path as has been suggested.

View the source of the page and click the css file link, if it 404s then check your .htaccess file and make sure that that directory is available!

try including the relative link in the function like on the user_guide

< link href = " < ? php echo base_url('css/style.css') ; ? >” rel=”stylesheet" type="text/css"/>

application/views/globals/css/style.css" type="text/css" media="screen" />
or whatever your folders srtucture is!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!