How to add CSS and JS to Codeigniter application |
[eluser]barun the michael[/eluser]
HI All Could any one help me out regarding how to add CSS and JS to a Codeigniter application. Please help........
[eluser]thinkigniter[/eluser]
Checkout this library... AssetLibPro http://ellislab.com/forums/viewthread/78931/ Nice library to make adding css and js easy...
[eluser]young[/eluser]
did you use the correct path? the root path is your document root in apache
[eluser]Colin Williams[/eluser]
Code: <style type="text/css">@import "/path/to/file.css"</style> Code: <scr1pt src="/path/to/file.js"></scr1pt> Put those tags in the <head> tag and make sure the paths are correct. Remember, paths are relative to the URL, not your view's file location on the server.
[eluser]Stefano G[/eluser]
Hi, I put my css, js and images at root level (outside the CI folders) Code: /-+-- [document root] and then refer to all them as simply as Code: <link rel="stylesheet" href="/css/screen.css" media="screen,projection" type="text/css" /> and so on... but probably this is not what you meant in your answer... :p Cheers! Stefano
|
Welcome Guest, Not a member yet? Register Sign In |