2 out of 3 rated this helpful - Rate this topic

border-left property

Specifies the properties of the left border of the object.

CSS Backgrounds and Borders Module Level 3, Section 4.4

Syntax

border-left: border-left-width || border-left-style || <border-left-color>

Property values

One or more of the following space-delimited values:

border-left-width

Any of the range of width values available to the border-left-width property.

border-left-style

Any of the range of style values available to the border-left-style property.

border-left-color

Any of the range of color values available to the border-left-color property.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value(see individual properties)

Standards information

Remarks

The border-left property is a composite property that sets the width, style, and color values for the left border of an object.

All individual border properties not set by the composite border-left property are set to their default values. For example, the default value for width is "medium".

If the color value is not specified, the text color is used.

For more information about supported colors, see the Color Table.

Examples

The following examples use the border-left CSS property and the borderLeft scripting property to specify the composite border-left properties.

This example uses a call to an embedded (global) style sheet to modify the attributes of the left border.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/border-left.htm


<head>
<style>
td {
  border-left: 0.5cm solid yellow;
}
.change {
  border-left: 0.5cm groove pink;
}
</style>
</head>

<body>

<table>
  <tr>
    <td onmouseout="this.className=''" onmouseover="this.className='change'">
    <img alt="sphere" src="sphere.jpg"> </td>
  </tr>
</table>


This example uses inline scripting to change the properties of the left border.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/borderLeft.htm


<td onmouseover="this.style.borderLeft='0.3cm groove yellow'">

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
Reference
border
Other Resources
CSS Enhancements in Internet Explorer 6

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.