FORMATTING with CSS by Lino Bertuzzi |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To study this section you should know how a basic HTML page is made and how it does works, otherwise you should study this subject (click here) before you read this article. Let's confine ourselves to the fundamental concepts, leaving out the abundance of detail and complex rules that govern its behavior. The use of a type of software such as ADOBE DREAMWEAVER can help us for many of these rules. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PAGE FORMAT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The HTML page style sheets include information both about the page itself and the elements contained in it.
Let me call as 'newstile' this example of CSS. It can be connected to the web page with the following statement, where newstyle.css is a style sheet code file that resides into a DIR that I've called css. and is made of two following lines: The first line says that all the page margin are zero pixels, the second one describes a frame (the div #cornice) that is a container needed to center all the content into the page html <body>.@charset "utf-8"; If you use such instructions linked to in a separate file you have to write in the first line of the html code between the TAGs <HEAD> and HEAD> this instruction that links the css file to the html page. <link href="css/newstyle.css" rel="stylesheet" type="text/css" />
Or the two instructions can be also written directly between the TAGs
<HEAD> and HEAD> using the following code (in red).This is the code
In this case you've put the style instructions between the <style type="text/css"> and </style>. tags
LET ME WRITE SOME FEW WORDS ABOUT TABLES and their style sheets This is a table of 4 columns and 3 rows, which is obtained by writing a code starting from the point where you want the table to be placed This is the code
Here are the explanations
You can fixe characteristics of row style by entering a code line by line to change row background, letters font, text color etc. <tr ....write here .code.. ...>&bnsp</tr> This can also be after the beginning of each tag wherever it is allowed to be done. For example, the paragraph <p> will be written as <p....write here .code.. ....> Tag contents </p> Let's take an example of how to attach some simple style code attributes to a <td> tag, ie a cell.
In addition to formatting the entire table, perhaps with a given fund or other color, the cell lines can be combined (merged)
And here's the code as it changes. Please see yourself, below, as changing the columns code of the second row.
In all cases the DREAMWEAVER software helps us by the drop down menu suggesting the allowed feature to be inserted.
|