RULES Attribute | rules Property

MS Office DHTML, HTML & CSS

RULES Attribute | rules Property


Sets or retrieves which dividing lines (inner borders) are displayed.

Syntax

HTML<TABLE RULES = sRule ... >
Scriptingtable.rules [ = sRule ]

Possible Values

sRule String that specifies one of the following values:
allBorders are displayed on all rows and columns.
colsBorders are displayed between all table columns.
groupsHorizontal borders are displayed between all THEAD, TBODY, and TFOOT objects; vertical borders are displayed between all COLGROUP objects.
noneAll interior table borders are removed.
rowsHorizontal borders are displayed between all table rows.

The property is read/write with no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

The value none turns off only the interior borders. To turn off the table borders, set the rules property to '', or omit the RULES attribute from the TABLE object.

Example

This example initially sets the RULES attribute on the table, and then uses the rules property to dynamically change the table borders.

Sample Code

<TABLE ID=oTable RULES="cols">
<TR>
<TD>EST</TD><TD>1am</TD><TD>8pm</TD>
</TR>
<TR>
<TD>CST</TD><TD>2am</TD><TD>9pm</TD>
</TR>
<TR>
<TD>MST</TD><TD>3am</TD><TD>10pm</TD>
</TR>
</TABLE>
:
<BUTTON onclick="oTable.rules=''">No borders</BUTTON>
<BUTTON onclick="oTable.rules='all'">All borders</BUTTON>

This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

TABLE

See Also

frame


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.