Design tutorials    
 
     
CitraTemplate - Website templates design
Search website template desing
Website Template Design Website Template Design Website Template Design Website Template Design Website Template Design
  Search website templates Search :
 
search template design
Tutorials web desgin
Artcile collections
Free link  directory
     
     
Home page
WEB TOOLS
Free web tools
web design
Template products
TEMPLATES
Web templates design
webdesign
SEO web tools
SEO NEWS
Website SEO News
website design
Web design tutorials
TUTORIALS
Web Design Tutorials
design web
Article collections
ARTICLES
Article Collection
template design
 
Marketiva is a financial services or forex online trading system
Submit a site Submit a Site Exchange links Link to Us
All web templates
Show all web templates design
all flash template
Website Template Design
Most poppular
The most poppular website templates
most poppular
Website Template Design
 
Website Template Design
Last added template
MoneyBookers Account
Electronic currency payment system for FREE
Website Template Design
Premium Templates
Website Template Design
Website Template Design
Web Templates Website Templates
Web Templates Swish Templates
Web Templates PHP-Nuke Templates
Web Templates Icon Sets Design
Web Templates WordPress Themes
Web Templates Flash Templates
Web Templates osCommerce Templates
Web Templates phpBB Skins
Web Templates CRE Loaded Templates
Web Templates Flash Intro Templates
Web Templates Corporate Identity
Web Templates Logosets Design
Web Templates Zen cart Templates
Website Template Design
Website Template Design
Others Categories
Website Template Design
Template last added
 Last Added Templates
Template last added
 Most Popular
Template last added
 Zero Download
Template last added
 Low Budget
Website Template Design
Website Template Design
Free Download
Website Template Design
 
Download free website templates
Free Templates
Download sample web Templates for free
Download Free Templates View Free Download
 
Download free clipart adn logo design
Free Clipart & Logo
Download free Clipart & Web desing elements
Dwonload free clipart View Free Download
 
Download firefox with google toolbars
Free Firefox
download firefox Download Firefox
Website Template Design
 
Website Template Design
Valid XHTML 1.0 Transitional Valid CSS!
Website Template Design
 
Website Template Design
LibertyReserve ecurrencies
Website Template Design
Website Template Design
Dreamweaver Tutorials
Website Template Design
 
Tutorial Dreamweaver - Wednesday, January 02, 2008
Table Borders

When a table is defined by a tag with no styles specified, a borderless table as wide and as tall as its enclosed data is displayed. From this simple beginning you can structure and style a table to take on virtually any display characteristi

Table Border Styles

Any of the border styles that were introduced earlier can be applied to the outer border of a table. Figure 8-6 shows example border styles coded in the general fashion giving in Listing 8-7.

<style type="text/css">
table {border:style 5px}
td {border:inset 1px}
</style>

Listing 8-7. General style sheet code for table borders.

The border style is identified in Figure 8-6 for each of the tables. The style sheet uses the general format {border:style size} for all border stylings.

image 1

Figure 8-6. Varieties of table borders.

All of the above tables have a outer border of 5 pixels to make then visually obvious. Different effects can be achieved with different border sizes.

Individual Border Styles

In the above examples, borders appear around all four sides of the table. You can, however, specify individual styling for the separate sides. Use the properties border-top, border-bottom, border-left, and border-right to selectively apply borders around the table. The table in Figure 8-7, for example, displays only top and bottom borders with the style sheet given in Listing 8-8.

<style type="text/css">
table {border-top:outset 5px; border-bottom:outset 5px}
td {border:inset 1px}
</style>

Listing 8-8. Style sheet for top and bottom table borders.

image 2

Figure 8-7. Table with top and bottom borders.

Collapsed Borders

Borders surrounding the cells in a table normally are displayed independently from each other. That is, each cell is surrounded by its own border, giving a “double border” look to side-by-side cells. These double borders can be collapsed into single borders with the border-collapse style property applied to the table.

Property : Values
border-collapse separate
collapse

Figure 8-8. Table border-collapse style property.

The default border setting for a table is border-collapse:separate. By specifying border-collapse:collapse, cells share "single borders" between them. This effect is illustrated in the tables in Figure 8-9 styled with collapsed borders.

<style type="text/css">
table {border:style 5; border-collapse:collapse}
td {border:solid 1px}
</style>

Listing 8-9. Style sheet to collapse table borders.

image 3

Figure 8-9. Tables with collapsed cell borders.

Note that collapsed borders are specified for the <table> tag even though the setting is applied to the table’s cells. Also, you cannot selectively apply collapsed border style to individual cells. When table borders are collapsed, all cell borders are styled as border:solid 1px; other styles and widths are not recognized.

Cell Border Styles

If cell borders are not collapsed, the same set of styles that are applied to the table’s outer border can be applied to its individual cells. In the examples in Figure 8.10 the outer borders of the tables are 1px in width and cell borders are 5px in width to emphasize their styling.

<style type="text/css">
table {border:solid 1px}
td {border:style 3px}
</style>

Listing 8-10. General style sheet code for cell borders.

image 4

Figure 8-10. Varieties of cell borders.

Selective Border Styles

Borders surrounding cells can be selectively styled with border-top, border-bottom, border-left, and border-right styles applied to the <td> tag. These styles are normally used to display top-and-bottom or left-and-right borders to emphasize the rows or columns of a table. The two tables shown in Figure 8-11 are displayed with the style sheets given in Listing 8-11.

<style type="text/css">
table {border:outset 5px; border-collapse:collapse}
td {border-top:solid 2px; border-bottom:solid 2px}
</style>

<style type="text/css">
table {border:outset 5px; border-collapse:collapse}
td {border-left:solid 2px; border-right:solid 2px}
</style>

Listing 8-11. Style sheets to apply row and column borders.

image 5

Figure 8-11. Application of row and column borders.

In order to extend row and column borders across the entire table, borders must be collapsed. Otherwise, breaks in the lines appear between the separate cells. As meantioned above, collapsed borders also means that the various cell border styles do not display. Therefore, a solid border style is the only one that need be used for the cells.

Individual Border Styles

Cell borders can be styled independently. If needed, each cell can have a different border style. Usually, though, only selected cells are given emphatic borders to highlight their contents. Of course, in order to view cell borders, the table border cannot be collapsed.

The following table displays different cell borders along its bottom row.

image 6

Figure 8-12. Emphasizing a table row with cell borders.

The above effect can be achieved by applying in-line style sheets to the selected cells. However, this is the type of situation especially made for the use of ID selectors and contextual selectors. Complete table and style sheet coding is shown below.

<style type="text/css">
table#TAB1 {border:outset 3px}
table#TAB1 td {border:inset 1px}
table#TAB1 tr#ROW3 td {border:outset 3px}
</style>

<table id="TAB1">
<tr>
<td>Cell 1.1<</td>
<td>Cell 1.2<</td>
<td>Cell 1.3</td>
</tr>
<tr>
<td>Cell 2.1</td>
<td>Cell 2.2</td>
<td>Cell 2.3</td>
</tr>
<tr id="ROW3">
<td>Cell 3.1</td>
<td>Cell 3.2</td>
<td>Cell 3.3</td>
</tr>
</table>

Listing 8-12. Code to emphasizing a table row with cell borders.

The table itself is assigned an id in order to uniquely identify it among other tables on the page. Also, the final row of the table is given an id to uniquely identify it among the other rows of the table. This is the row in which special border styling is applied to its cells.

Within the style sheet the table is given an outer border style through the ID selector table#TAB1, selecting the <table> tag with id="TAB1" for application of the border style. The contextual selector table#TAB1 td applies a 1-pixel inset border to all cells of this table -- i.e., where a <td> tag is contained within a <table> tag for a table with id="TAB1".

A contextual selector is also used for styling the last row of the table. A 3-pixel outset border is applied with the selector table#TAB1 tr#ROW3 td -- i.e., where a <td> tag is contained within a <tr> tag with id="ROW3", which is contained within a <table> tag with id="TAB1".

If only a single cell has its borders styled, then that cell can be given an id, say, id="CELL9". Then the selector for styling that one cell would be

table#TAB1 td#CELL9 {border:outset 3px}

where a <td> tag with id="CELL9" is contained within a <table> tag with id="TAB1". It would not be necessary in this case to identify the table row.

Deprecated Table Attributes

Borders are displayed around the table and between table cells with the border="n" attribute of the <table> tag, where n is the width of the outer border in pixels. The following table has 1-pixel borders:

<table border="1">

image 7

Changing the width of the outer border does not effect the size of cell borders. The default style of the outer border is "outset"; the default style of inner borders is "inset":

<table border="5">

image 8

Your Ad Here
 
 
 
Website Template Design
Web Tutorials
Website Template Design
Website Template Design
Creating Web Using Dreamweaver Dreamweaver
Creating Web Using Dreamweaver
Creating Web Using Dreamweaver Macromedia Flash
Animation & ActionScript Tutorials
Creating Web Using Dreamweaver Photoshop
Design Web Using Adobe Photoshop
Creating Web Using Dreamweaver ImageReady
Adobe ImageReady Tutorials
Creating Web Using Dreamweaver PHP Language
PHP Language Tutorials
Website Template Design
 
RSS : RSS 0.2 RSS Valid
Website Template Design
Website Template Design
Live Support
Website Template Design
Website Template Design
Website Template Design
Check for FAQ 24/7 Live Chat Support
Check for Terms of Usage Technical Support
Check for Terms of Usage Billing Questions
Website Template Design
Website Template Design
Template Information
Website Template Design
Website Template Design
Check for FAQ Check for FAQ
Check for Terms of Usage Terms of Usage
Website Template Design
Website Template Design
Link Partners
Website Template Design
Website Template Design
Templatemonster Templatemonster
Web Design Library Web Design Library
Site2you Site2You
Template tuning Template Tuning
Flash design Grahacitra.com
Link Exchange iWEBTOOL.com
sman matauli SMAN 1 Plus Matauli
Seknas MHA Seknas MHA
Yayasan Dharmais Yayasan Dharmais
Website Template Design
 
 
 
Design tutorials    
Website Template Design Website Template Design
  Copyright 2007 @ CITRATEMPLATE.
All Rights Reserved
  Main menu : Front Page | Template Products | Seo News | Tutorials | Articles | Sitemap | Award | Link to Us | Directory
Partners : Link Exchange Directory. Exchange links the easy way! | Linkslister | Linkdash | Partners | Resources - Link Exchange | ComExchange - Link | Trade web Links | Add Your Links | links highway |