border-right-width Attribute | borderRightWidth Property

DHTML, HTML, & CSS

border-right-width Attribute | borderRightWidth Property


Sets or retrieves the width of the right border of the object.

Syntax

HTML{ border-right-width: sWidth }
Scriptingobject.style.borderRightWidth [ = sWidth ]

Possible Values

sWidth String that specifies one of the following values:
mediumDefault width.
thinLess than the default width.
thickGreater than the default width.
widthFloating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For more information about the supported length units, see CSS Length Units.

The property is read/write with a default value of medium; the cascading style sheets (CSS) attribute is not inherited.

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

To use this property, inline elements must either have an absolute position or layout. Element layout is set by providing a value for the height property or the width property.

The property is supported on block and replaced objects only.

Example

The following examples use the border-right-width attribute and the borderRightWidth property to specify the width of the right border.

This example uses a call to an embedded (global) style sheet to change the width of the right border to 1 centimeter when a mouse click occurs.

Sample Code

<HEAD>
<STYLE>
     TD { border-right-width:3mm }
    .changeborder1 { border-right-width:1cm }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
    <TD onclick="this.className='changeborder1'"
        ondblclick="this.className=''">
        <IMG src="sphere.jpg">
    </TD>
</TR></TABLE>

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

This example uses inline script to change the width of the right border to 1 centimeter when a mouse click occurs.

<TD onclick="this.style.borderRightWidth='1cm'">

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.
BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, currentStyle, custom, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, Hn, HR, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, runtimeStyle, SPAN, style, TABLE, TD, TEXTAREA, TH, UL, XMP

See Also

border, borderWidth


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.