asp.net.ph

Skip Navigation Links

border-bottom Attribute | borderBottom Property

CSS Attributes Index   Box Attributes


Sets or retrieves the border-bottom-width, border-bottom-style, and border-bottom-color of the object’s bottom border.

Syntax


CSS { border-bottom: border-bottom-width | border-bottom-style | border-bottom-color }
Script object.style.borderBottom = [ sWidth ] [ sStyle ] [ strColor ] ]

Possible Values


border-bottom-width sWidth Any of the range of values available to the borderBottomWidth property.
border-bottom-style sStyle Any of the range of values available to the borderBottomStyle property.
border-bottom-color strColor Any of the range of values available to the borderBottomColor property.

The property is read/write with a default value of medium none; the CSS attribute is not inherited.

Remarks

The borderBottom property is a shorthand ( composite ) property for setting the border-bottom-width, border-bottom-color, and border-bottom-style for the bottom border of an object.

All individual border properties not set by the composite borderBottom property will be set to their default values. For example, the default value for border-bottom-width is medium.

For more information on supported colors, see the Color Table. If a border-bottom-color is not specified, the text color is used.

The SPAN and DIV objects must have either the position or the width attribute set in order to apply a border.

Example

The following examples demonstrate use of inline event handlers to dynamically set the composite properties of the bottom border of an element. Both methods yield the same effect.

The sample below defines border-bottom style attributes in an embedded stylesheet, and invokes calls to the stylesheet to set an element’s bottom border characteristics in response to mouse events.

<style type="text/css">
<!--
   td { border: 10pt ridge beige }
   .groovy { border-bottom: 15pt groove yellow }
-->
</style>
...
<table>
<tr>
   <td onmouseover="this.className='groovy'"
      onmouseout="this.className=''">
         <img src="../shared/images/samp01.jpg">
   </td>
</tr>
</table>

Note that border-bottom applies only with border-width set.

 Show me 

The sample below uses inline event handlers to dynamically set an object’s borderBottom property in response to mouse events.

<td onclick="this.style.borderBottom='15pt groove yellow'"
   ondblclick="this.style.borderBottom='10pt ridge beige'">
      <img src="../shared/images/samp13.jpg">
</td>

 Show me 

See Also

border-bottom-color, border-bottom-style, border-bottom-width



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note