Home arrow PHP arrow Adding CSS to Handling Views with CodeIgniter

Adding CSS to Handling Views with CodeIgniter

Welcome to the second installment of a series that shows you how to handle views with CodeIgniter. Made up of seven parts, this series explains different methods that you may use for loading view files within your CI-based web applications, ranging from working with a simple sequential approach, to including views within other views. This part will show you how to improve your web page's appearance with CSS.

  1. Adding CSS to Handling Views with CodeIgniter
  2. Review: loading view files sequentially with CodeIgniter
  3. Enhancing the look and feel of view files with CSS styles
  4. Rendering the improved version of a web page
By: Alejandro Gervasio
Rating: starstarstarstarstar / 9
March 26, 2009

print this article




If you've had the chance to work with CodeIgniter, then you know that it is a  robust framework with many useful features that let PHP programmers build web applications very quickly and with minor efforts. Of course it has the ability to manipulate view files in different ways, which can be quite helpful when creating front-ends for a web application or for a web site.

So, if youíre interested in learning how to load views in all sorts of clever ways with this popular PHP framework, them start reading this series of articles right now!

Returning to the topic of sequential methods, you may recall that in the previous article of this series I demonstrated how to generate independently the header, main area and footer section of a basic web page by loading sequentially three different views. This task was performed by a controller class, which was called ďWebPage.Ē

It's worth mentioning that even though this controller populated the content area of this sample web page with some database records, it didnít use any model to specifically handle this data. However, donít worry about this for now, since this topic will be covered in upcoming articles of this series.

Now itís time to continue exploring the capabilities given by CodeIgniter when it comes to handling views. Since the visual appearance of the web page mentioned above was pretty rudimentary, in this second article Iím going to improve it a bit to make it look more appealing and professional.

So, with the preliminaries out of our way, letís see how to enhance the look and feel of this example web page. Letís get started!

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: