Web Page Layout Using Tables and CSS
|
In part 1 we covered the table html/xhtml and here we will cover the style sheet to control the table. Here is the basic structure or our external style sheet:
| .main{} .header{} .empty{} .content{} .navigation{} .footer{} |
Now let's add some detail to the style sheet. What we will do, to illustrate how it works, is to construct a table with the following:
| .main { width: 720px; border-collapse: collapse; border: solid #000 1px; } .header{} .empty{ border: solid green 1px; /* illustration only*/ } .content { font-family: Verdana,Arial,Sans-serif; font-size: 10pt ; border: solid red 1px; /* illustration only*/ padding-left:10px; padding-top:10px; padding-right:10px; padding-bottom:10px; } .navigation { width: 160px; text-align: center; border: solid blue 1px; /* illustration only*/ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt ; line-height: 22px; font-weight: bold; } .footer{ text-align: center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt ; } |
To use it just insert in the header tags as shown highlighted below (note: I have removed other meta tags for clarity):
| <head> <title>webpage-template-2</title> </head> |
To see how it works here is the table without the style sheet and here is the table with the style sheet.
Related Articles and Resources:
|
[Home page] [About us] [Privacy Policy] [Contact Me] |
|
Web Page Layout Using Tables and CSS: Part 2 |