X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style borderBottomWidth Property

Style Object Reference Style Object

Example

Change the width of the bottom border of a <div> element to 10px:

document.getElementById("myDiv").style.borderBottomWidth="10px";

Try it yourself »


Definition and Usage

The borderBottomWidth property sets or returns the width of the bottom border of an element.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The borderBottomWidth property is supported in all major browsers.


Syntax

Return the borderBottomWidth property:

object.style.borderBottomWidth

Set the borderBottomWidth property:

object.style.borderBottomWidth="thin|medium|thick|length|initial|inherit"

Property Values

Value Description
thin Defines a thin border
medium Defines a medium border. This is default
thick Defines a thick border
length The width of the border in length units
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: medium 
Return Value: A String, representing the width of an element's bottom border
CSS Version CSS1


More Examples

Example

Change the width of the bottom border of a <div> element to thin:

document.getElementById("myDiv").style.borderBottomWidth="thin";

Try it yourself »

Example

Return the width of the bottom border of a <div> element:

alert(document.getElementById("myDiv").style.borderBottomWidth);

Try it yourself »


Related Pages

CSS tutorial: CSS Border

CSS reference: border-bottom-width property

HTML DOM reference: border property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook