Custom Search

News World

Mar 14, 2008

Web Develop > Column Width & Specified of Table - Lesson - 06


We started our study on tables in previous lesson and We will continue our study in this lesson. As I told you in previous lesson, tables are very important in professional web design. You will need them for holding pictures, buttons, text etc. In this lesson we will cover more options about table cells, cell padding, cell spacing and finally we will learn how to link different parts of an image to different locations on the web.


Cell Width (Column Width)

In previous lesson we learned how we can determine width and height of a table.

In above table we have not determined sizes for two cells in first row. In this way you will not be able to say how will these cells display in different browsers and different screen modes. You can determine width of each column in your table by specifying width of cells in first row. Just be careful about correctness of sizes you specify. For example if your table width is 200 pixels sum of cell widths must be exactly 200.
You can also determine cell widths in percent. Sum of cell width percentages must be 100%.

When you determine sizes of first row cells you will not need to determine widths for second row cells. If you want a cell to be empty, you cannot omit definition for that cell. Insert cell definition, and enter a between "TD""/TD" tags .As we told in later lessons this means a space character. You must enter at least a space in this form if you need an empty cell.Otherwise area of that cell will not apear like an empty cell.

In above example we have two empty cells but as we have specified both table and cell sizes, table will not lose it's shape. If we remove sizes, we cannot guarantee how it will be displayed on different browsers and screen modes. For the above reason we suggest you to determine table sizes in every table you use. Using fixed sizes is not a good idea. Use percent sizes instead of fixed sizes.


Cell Padding

You can specify two other important size parameters for a table. Cell padding is the space between cell borders and table contents such as text, image etc.

Default value for this option is 1. It means that contents of a cell will have a distance of one pixel with borders. If you don't want any space between object inside the cells and its borders you can determine the value of 0 for this option.


Cell Spacing

Cell spacing parameter determines the space between inner and outer parts of a table. In fact a table is constructed form two borders . A border area and a cell area. There is a space between cell area and outer border. We call this "cell spacing".
If you increase this value you will have a thick border. Default value for this property is 2. If you specify 0 for it, you will have a very thin border.

You can also mix cell spacing and cell padding options to make specific tables that you need.


Tables and Images

Sometimes you need an image that when users click on different parts of it they go to pages. How to use an image as a link to another address or page? Special case you will need to cut your picture into as many parts as you need and insert them in a table that holds image parts beside each other. Then you will link each image part to a different page.

You will also need to set both cell spacing and cell padding to the value of 0 to prevent the table to
be seen between image parts. In this way users will see a single image but when they click on different parts of image they will go to different addresses.


Working with Graphic Editing Programs

As a web designer you need a graphics manipulation program. There are many professional programs in the market, like ; Adobe Photo Shop, Macromedie Fire Work, etc. Photoshop is a very professional and powerful program but it is an expensive program.


You can use PaintShop Pro instead. This is another professional but easy program. You can even download limited versions of this program from many download sites. These programs will enable you to cut pictures into parts, add many effects on your graphics, decrease graphics size etc.

No comments:

IT Conversations

Moneycontrol Latest News

Latest new pages on Computer Hope

Latest from Infoworld

Door Lock

Door Lock Import Top Door Lock from China Contact Quality Manufacturers Now