O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating a stylesheet for the application

Let's start by adding a stylesheet to change the look of our application.

  1. Open views/layout.php. This file currently drives the layout for all of the pages in our project. We just need to add code to include our stylesheet:
    <html>
    <head>
    <link href="<?php echo $this->make_route('/css/master.css') ?>" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    <?php include($this->view_content); ?>
    </body>
    </html>
    
  2. Create a new file named master.css, and place it in our working directory's public/css folder.
  3. Add a quick piece of code to public/css/master.css that will display a different color background, so that we can test that this all works.
    body {background:#e4e4e4;}
    

What just happened?

We added ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required