Welcome Guest, Not a member yet? Register   Sign In
silly question
#1

[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" />
#2

[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.
#3

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

[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.
#5

[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.
#6

[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.




Theme © iAndrew 2016 - Forum software by © MyBB