![]() |
Intro Browser The Page Tags Elements Tables Layout Perfection
|
|
|
Now we come to the place where we will use our skill to push HTML where it was never intended to go -- into fine layout control. There are expensive software programs that can do it, but you can do it too, with Notepad, SimpleText, or a WebTV. All you need are two of the concepts on which we've meditated: tables, and image height and width attributes.
Tables are the first key to control because they allow the screen to be divided into discrete sections, and because they can be set (or pushed) to specific heights and widths. They can also be nested inside one another. This allows you to make a large division of the screen into major areas (cells), and then to place a table inside one (or more) of the cells, in whose cells you will place images or text.
The Net4TV main screen is a good example of this (if you've forgotten what it looks like, click on the logo in the sidebar). There are two columns of "channel icons" along the left side, but the critical placement is the animated GIF that plays on the TV screen.
To see the structure of the Net4TV main screen, with the images removed and the table borders turned on, CLICK HERE! (Don't worry, there's a link to get back.) Note that the width of the borders changes the alignment by a few pixels.
To get all of these elements in the right place, we first make a "page" table the size of the WebTV screen* by using width=544 height=420 attributes in the <TABLE> tag. This gives us a frame in which to build, and also makes sure that if computer users have a larger or smaller screen size, our images will still line up correctly on top of the background.
The page table has one row with two data cells running the full height of the screen. In the left cell is another table called the "channels" table. In its data cells are the icons for the various main sections in Net4TV. The table is set to 180 wide to keep the columns of channel icons together and close to the left edge.
The right hand cell of the page table has a table inside it called the "main" table. Here, the trick is to line up the animated GIF over the TV screen in the background and to keep it from moving off the screen if computer users re-size their browser window. The main table has four rows of two data cells each. The height of the rows is used for vertical positioning, and the width of the left cell determines the horizontal positioning.
WebTV has a very useful set of table attributes, ABSHEIGHT and ABSWIDTH, which determine the absolute size of a table or its cells. The cells will maintain their ABS size with or without data inside, and any data that is too large will simply be truncated. These WebTV-only tags are ignored, however, by the computer browsers. Tables set to a particular size with WIDTH and HEIGHT attributes will grow to accomodate larger content, and despite size tags, a row or column with nothing in it will sometimes "collapse" -- not hold the size that you set it.
So to keep this from happening, we use the characteristic we discussed in the "Elements" meditation -- the ability to resize a graphic by changing its HEIGHT and WIDTH attributes.
Dudette |