Table Text Options
September 17, 2001
There are also ranges of options you can use only with the table text formats, for styling tables, in addition
to all of the character options that are supported by default as well. These options are as follows:
- cell-border-width specifies the width of the border surrounding the cell
- cell-border-color the color of the border surrounding the cell
- cell-border-style one of six possible styles for the border of the cell, which can either be flat, raised, sunken, ridge, groove or none
- cell-margin the amount of space between the contents of the table cell and the table's inner margin
You could use these table text options as follows to create a table with a rather more sophisticated (if
not a particular tasteful!) set of styles:
|| table3.curl
{curl 1.7 applet}
{applet license = "development"}
{table cell-border-width=1, cell-border-style="raised",
cell-border-color="green", cell-margin= 5,
{header-row
{header-cell background="pink", Artist}
{header-cell background="pink", Movement}
}
{row
{cell Paul Klee}
{cell font-style="italic", Abstract Expressionism}
}
{row
{cell Max Ernst }
{cell font-style="italic", Surrealism}
}
}
Here we've used a mixture of table text options, cell-border-width, cell-border-style,
cell-border-color, and cell-margin. These alter the border styling of the table cells. As we place them
within the table text format, they affect the table as a whole. We separately specify the font-style as
italic for the second column contents, and we specify the header-cells as having a pink background. This
all results in the following display, which looks rather better in black and white than it does in color:
This demonstration amply shows the versatility of Curl's table text formats. In principle, many browsers
support the equivalent elements in HTML, for background colors and table headers and so on.
However, when you come to run style sheets on your tables to alter the colors of individual cells within
a table, even in the most recent versions of browsers do not support these features.
Table Text Formats
Early Adopter Curl
|