Tables in CSS
This is just a quick tutorial to help you use your css file to define properties of your tables. Your .css file is your cascading style sheet. If you do not know what this is please refer to my earlier tutorial: an introduction to css.
While making tables in your html file you may find that you have to include the same tags over and over throughout your file, and often it is a lot easier to define the properties in your style sheet. For example in each of your <table> tags you often select your font, its size and colour; padding; backround colours; and so on. These can all be defined in your stylesheet and just applied to certain tables.
So first of all, open up your stylesheet and find a space for the following:
.more { border: 1px solid #000000; background: white; padding: 2px 2px 2px 2px; }
.more td { border: 1px solid #000000; background: white; padding: 2px 2px 2px 2px; }
.more td { border: 1px solid #000000; padding: 2px 2px 2px 2px; font-family: Verdana; font-size: 8pt; font-weight: normal; }
Now I'm pretty sure this is quite clear and won't need much explaining but here we go. For each table you can call it something different. You can use the above multiple times, and change the properties for each table. Now from the above, we're going to define the 'class' name. The period defines that this is a class, and the word following is the class title. So the above class is "more".
Having set the class you then have to tell your table to bring up properties from this class. So we insert class="more" into your table tags. So in your html file you should now have <table class="more"> The first set of brackets above defines the properties of your table. As you can see I have included a border, a background colour and my padding properties. As you can see I have defined the properties for the tr and td separately - so you can change the properties for these are you see fit.
The rest of the above is pretty self explanitory, so I'm not going to go into a lot of detail; however as you learn more about css and html you will find other ways to manipulate your tables and find ways to add in extras into your tables. There are always new ideas for you to try out this is just a template for you to build on.