|
| ||
|
This lesson will deal with the way to control the basic size of the table and its content. We will working with the table that you began in Lesson One. The first thing we want to do here is to make sure the table is visible at first.
This allows you to be able to more easily see what your table is doing as you build it.
The way we do this is by simply adding BORDER=1
to the end part of the TABLE tag like this:
>TABLE WIDTH=400 BORDER=1< This will create a simple table that is 400 pixels wide,but has no height yet,the height is set by the contents of the table normally,but you can add a HEIGHT=400 to the tags as well,in the same fashion that you add the WIDTH=400 tag above. This will cause the table to have a minimum height.
>TABLE WIDTH=400 HEIGHT=100 BORDER=1< >/TR< >/TABLE<
The square you see above is what the table code above it looks like in use.
CENTER tags were added *inside* the table,around the text,in order to center such
a small sentence inside of the large table in the example above. You can change the 400 to any number you want so long as it isn't smaller than the measurements of the tables content.
A few tips to keep in mind before we move on.1. Tables cannot be made smaller than the largest graphic or block of text inside them. 2. If you want to set the width for a single celled table,place the WIDTH code into the TABLE code and for multi-celled tables,put it into each of the TD tags instead. 3. You may see some web pages where the WIDTH tag is using % percentages instead of pixels,avoid these.What happens is that when the table width is specified using the percentage,it will set the table to the width of the page,in your visitors browser.Which means that if they resize the page even a little bit your table and it's contents will become resized as well and it will no longer look correct.
Your homework for this lesson; Back to the Introduction...Back to Lesson One...To the Next Lesson |