Archive for the 'Tutorials' Category

Colour Changing Tables

Written by admin on Thursday, May 8th, 2008 in Tutorials.

Okay. This isn’t all HTML, Its a bit of JavaScript but you will pick it up easily.

Right Plain tables can look boring and if there is a large amounts of rows with data alternating colours is not enough and it can get very annoying when you loose your place and can be stressful on the eyes.

So highlighting your table cells can be very helpful when reading down a list.

This tutorial will show you how to make a cell change colour (effectively highlight itself) when it is hovered over.

In your td tag place the following code:

<td onMouseover=”this.bgColor=’#FFCC00′”>

This will make your cell change colour when its hovered over. The value in the single quotes is the colour it will go.

what it is doing is saying. When hovered over this cells bgcolor = #FFCC00.

But this colour will stay and will not disappear.
So we need to tell the cell what to do when its not hovered over.

(more…)

Output Data from Text File with PHP

Written by admin on Wednesday, May 7th, 2008 in PHP Tutorials, General.

In this tutorial I am going to teach you how to generate data from a text file with the use of PHP.

To start you must first make a document called data.txt

Open up your data.txt for editing (I highly recommend using Notepad++).

Now put the following code into your text file.


| News 1 | News 2 | News 3

The above is what we can output. Each phrase is separated by a |. We need this so that we can tell our php script when to stop outputting a piece of data.

Now you need to make a PHP file called quotes.php.

This is the file that will generate our data.
Insert the following code into your php file.

(more…)

CSS Footers

Written by admin on Thursday, April 10th, 2008 in CSS Tutorials, Tutorials.

In coding a website most structures have a footer at the bottom of the page. Have you ever struggled with getting a footer to stay at the bottom of a page? This mainly occurs when using the float attribute to have multiple columns. But there is a way around this.

Most footers are defined using thew style name: footer. So inside your footer style if you add the following:

(more…)

PHP Connection to a database

Written by admin on Tuesday, December 25th, 2007 in PHP Tutorials.

PHP and MySQL there has to be a connection somewhere to use them both. But how do you make a connection?

Below will show you.

First…

You should never store any of your connection information anywhere other than in a PHP
document.

Now lets get started.

Create a php file called config.php and place it in the same directory as your index page.

(more…)

CSS Horizontal Lists

Written by admin on Tuesday, December 25th, 2007 in CSS Tutorials.

CSS Lists are very helpful, but what if you want them horizontal? This is easily done with a few attributes. First you need to give your ul and li tags an id. Example:

<div id=”horizontal”>

<ul>

 <li>

 </li>

</ul>

</div>

(more…)



Site Navigation