CodeIgniter Forums

Full Version: where to put style sheets and images??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]dadamssg[/eluser]
where do you put your style sheets and how you do reference them to use in your views? i put my style sheet in my view folder and tried to call it like so with no avail

<link rel='stylesheet' type='text/css' href='silk.css' />

El Forum

[eluser]JHackamack[/eluser]
Linked stylesheets belong between the <head></head> tags in HTML.

El Forum

[eluser]WebsiteDuck[/eluser]
One way is to create a css folder in your root directory (alongside application, system, etc) and do this in your view:
Code:
<link href="<?php echo base_url(); ?>css/stylesheet.css" rel="stylesheet" type="text/css" />

If you want to put the css files in your view folder you can add the folders in like so:
Code:
<link href="<?php echo base_url(); ?>application/views/css/stylesheet.css" rel="stylesheet" type="text/css" />

El Forum

[eluser]JHackamack[/eluser]
I must have misread the context. I create a folder structure like such:

/Application/Resources/CSS
/Application/Resources/Images
/Application/Resources/Javascript

and store things there (where application is the app name)

El Forum

[eluser]dadamssg[/eluser]
awesome, thanks fellas