Welcome Guest, Not a member yet? Register   Sign In
calling CSS files
#1

[eluser]viisik[/eluser]
How the CSS files are included in the application.

As I understand CSS files URL-s are put inside the views ?

How you integrate CSS with a header and footer into one file-outlook
#2

[eluser]Colin Williams[/eluser]
CodeIgniter doesn't change the way your web server works. If your CSS exists at http://www.example.com/style/main.css, then you will link your pages to that file with a <link> tag.
#3

[eluser]Unknown[/eluser]
In CodeIgniter it is fairly easy to include static and dynamic css, js files... for static create a file ex: header.php in your views folder and put all you meta data there now every times when you include this file from your controller your header section will be loaded from header.php file.... you may also include dynamic css files by passing css files array directly from your controller files.

for example:
$data['css'] = array('file1.css,'file2.css');

now in your header.php file

if(isset($css))
foreach($css as $file):
echo '<link rel="stylesheet" href="'.$file.'" type="text/css" />';

endforeach;
#4

[eluser]Zeeshan Rasool[/eluser]
@Colin Williams @Coder320 good explained,




Theme © iAndrew 2016 - Forum software by © MyBB