Home arrow PHP arrow Page 5 - Completing a Blogger with PHP

Improving the blogger’s visual appearance - PHP

If you’re looking for a comprehensive series on how to create an expansible blog application with PHP 5, then this group of tutorials might be what you’ve been expecting to find. Welcome to the concluding installment of the series "Building a blogger with PHP." Made up of three friendly articles, this series provides you with all the information you need to start building a blog system with PHP in a few easy steps.

TABLE OF CONTENTS:
  1. Completing a Blogger with PHP
  2. A quick look at the BlogProcessor class
  3. Providing the blog processor with database connectivity
  4. Implementing client-side data validation on input forms
  5. Improving the blogger’s visual appearance
By: Alejandro Gervasio
Rating: starstarstarstarstar / 8
December 05, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

By following a similar approach to the one I took when I included a basic client-side validation mechanism, I’ll also provide the blog application with a few CSS rules aimed at improving the corresponding visual presentation. As you’ll imagine, this task can be easily achieved by including the CSS file listed below. Here is the file in question:

body{

            background: #eee;

            margin: 0;

            padding: 0;

}

h1{

            width: 600px;

            padding: 10px;

            margin-left: auto;

            margin-right: auto;

            background: #339;

            font: bold 20px Arial, Helvetica, sans-serif;

            color: #fff;

            border: 1px solid #000;

}

h2{

            font: bold 18px  Arial, Helvetica, sans-serif;

            color: #339;

}

h3{

            font: bold 16px Arial, Helvetica, sans-serif;

            color: #339;

}

textarea{

            width: 300px;

            height: 200px;

            font: normal 12px Arial, Helvetica, sans-serif;

            color: #000;

}

.blog{

            width: 600px;

            padding: 10px;

            margin-left: auto;

            margin-right: auto;

            margin-bottom: 5px;

            background: #ccf;

            border: 1px solid #000;

}

.blog p{

            font: normal 12px Arial, Helvetica, sans-serif;

            color: #000;

}

.dataform{

            width: 600px;

            height: 410px;

            padding: 10px;

            margin-left: auto;

            margin-right: auto;

            margin-bottom: 5px;

            background: #dccae8;

            border: 1px solid #000; 

}

.dataform p{

            margin: 5px;

            font: normal 12px Arial, Helvetica, sans-serif;

            color: #339;

}

.datafield{

            width: 300px;

            font: normal 12px Arial, Helvetica, sans-serif;

            color: #000;

}

.error{

            margin: 0 0 0 5px;

            font: normal 12px Arial, Helvetica, sans-serif;

            color: #f30;

Finally, the blog application has been completed! In this case, I decided to include the above CSS declarations, but this feature can be easily modified to suit your personal taste.

Final thoughts

Sad but true, we’ve come to the end of this series. In this hopefully instructive journey, you learned how to build a highly expansible blogger with PHP 5, which allows you to insert, update and delete entries very easily.

In this case I purposely used the term “expansible.” You can introduce your own modifications to the application to extend its existing functionality. See you in the next PHP tutorial!



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

blog comments powered by Disqus
   

PHP ARTICLES

- 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...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap

Dev Shed Tutorial Topics: