Accueil / Ingénierie Web / jQuery / Working with css, images, and jQuery in CodeIgniter

Working with css, images, and jQuery in CodeIgniter

Print Friendly, PDF & Email

I spent a lot of time for seeking an appropriate solution to use external stylesheets in CodeIgniter. If you are not patient, I think you will give up the racing.

Here is the silver point I have found. It can be described briefly as follows:

Typically, create an “assets” directory for files that need to be accessed like the following:


Pay attention to that all file references are usually based upon the index.php file. This means you would access a css file via “assets/styles/mystyle.css”

When I want to use a stylesheet and javascript links, I usually do the following:

<link href="<?php echo base_url().'assets/styles/style.css';?>" rel="stylesheet" type="text/css" />

You could try several instructions as follows:

À propos Nguyen Vu Ngoc Tung

I love making new professional acquaintances. Don't hesitate to contact me via if you want to talk about information technology, education, and research on complex networks analysis (i.e., metabolic networks analysis), data analysis, and applications of graph theory. Specialties: researching and proposing innovative business approaches to organizations, evaluating and consulting about usability engineering, training and employee development, web technologies, software architecture.

Laisser une réponse

Votre adresse email ne sera pas publiéeLes champs requis sont surlignés *




Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.