Using Style Sheets to minimize HTML markup in Tables |
Topic: Using Style sheet to attach to HTML table to allow easier formatting without forcing <FONT> on every cell.
I've just been messing around with style sheets and they come in extremely handy when building HTML tables. One of the problems with HTML tables is that changing font attributes requires you to set the attribute for each cell. This has two implications: Size (if you have a FONT tag on every cell it gets big quickly and font tags are typically long) and formatting flexibility in generic functions such as ShowCursor().
With Style sheets however you can assign a style to the entire table by using the CLASS key word:
<table border='0' cellpadding='5' class='BT' cellspacing='0' width='100%'> The style tag might look like this:
<style>
<!--
.BT {font-size: 10pt; font-family: Arial; font-weight: normal;
Face: Helvetica,Arial,Verdona}
-->
I like short names for styles so it's efficient in table generation, if you decide to use a style tag on each row or cell.
So, to display a ShowCursor generated table in Arial instead of the default browser font, you'd set up the style sheet tag in the header of the document and then do this:
loSC = CREATE('wwShowCursor')
loSC.cExtraTableTags=[ CLASS='BT' ]
...
loSC.ShowCursor()
Very clean and easy.
Last Updated: 08/15/99