Click to return to the DHTML, HTML     
border-left-style Attribu...     border-right Attribute | ...     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

border-left-width Attribute | borderLeftWidth Property


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

Syntax

HTML{ border-left-width: sWidth }
Scriptingobject.style.borderLeftWidth [ = 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 Properties.

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-left-width attribute and the borderLeftWidth property to specify the border width.

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

Sample Code

<HEAD>
<STYLE>
    TD { border-left-width:3mm }
    .changeborder1 { border-left-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 scripting to change the width of the left border width to 1 centimeter when a mouse click occurs.

<TD onclick="this.style.borderLeftWidth='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:
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!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.