简体   繁体   中英

Codeigniter isn't applying one of the css stylesheets

I have 3 css stylesheets set to load withing the base_template in a codeigniter application.

I did not do the initial setup for the page (an undocumented page) and im basically bruteforcing every problem until it looks good enough.

The problem seems to be that the css I added, by basically changing the static base_template page, is loading, but the rules within arent being applied.

Is there more setup required for a single css file within codeigniter? Or am i going about it all wrong?

Thanks.

Use Firefox's firebug (an additional add in) or IE's developer tools (F12 once you're in the IE window) and "Inspect Element" on the element that does not have the style being applied to it. You will be able to see what styles are affecting that element and see your collisions as well...

Likely if codeigniter has gen'ed a lot of the css for you, they're probably styling the elements in a less obvious way than you would have. Firebug, Chrome's dev tools, and IE's dev tools can all help you discover what styles ARE getting applied. I tend to start there and work my way back to the css with problems like these.

Here's the link for firebug: http://getfirebug.com/html

Have you checked if it is because your browser cache is not updated? Either delete cache from your browser history or change the css version number like below, which will force the browser to automatically download the css file:

 <link href="/path/to/local/file.css?ver=1.1" rel="stylesheet" type="text/css">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM