CodeIgniter Forums
silly question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: silly question (/thread-2510.html)



silly question - El Forum - 08-09-2007

[eluser]gafro[/eluser]
hey guys,

quick simple question.

where do i place the css directory?

heres my link

<link rel="stylesheet" href="styles/global.css" type="text/css" media="screen, projection" />


silly question - El Forum - 08-09-2007

[eluser]Bacteria Man[/eluser]
The general consensus is to create an assets folder off of the webroot and put all your stylesheets and images there.


silly question - El Forum - 08-10-2007

[eluser]chobo[/eluser]
I put my css in public_html -> css folder. CodeIgniter is above the public_html folder for me.


silly question - El Forum - 08-13-2007

[eluser]fMertins[/eluser]
Hi.. I´m begining in CI (1 week ago), I have the same question about CSS paths and best practices.

I have 2 apps and the CSS file works only with absolute path... Please see this Example Screen
How can I use relative path?
Thank you.


silly question - El Forum - 08-13-2007

[eluser]Bacteria Man[/eluser]
Hi,

Welcome to CI.

You want to put your styles folder outside of (or at the same level as) the system folder. In others words, in the webroot of the web app.

Putting your asset folder(s) inside the system folder is a bad idea because it exposes the hierarchy when defining the import path.


silly question - El Forum - 08-13-2007

[eluser]fMertins[/eluser]
Hi, thanks. I moved the css file to a "styles" folder at the same level of the "system" folder and used:
<link href="../styles/painelViews.css" rel="stylesheet" type="text/css" />
Now it´s working... with relative path. Thank you.