CSS border | css border bottom
ExampleSetthestyleofthebottomborderfordifferentelements:h1{ border-bottom:5pxsolidred;}h2{ border-bottom:4pxdottedblue;}div{ border-bottom:double;}TryitYourself»[1]DefinitionandUsageTheborder-bottompropertyisashorthandpropertyfor(inthefollowingorder):Ifborder-bottom-colorisomitted,thecolorappliedwillbethecolorofthetext. Showdemo❯[2]Defaultvalue:mediumnonecolorInherited:noAnimatable:yes,seeindividualproperties.Readaboutanimatable[3]Tryit[4]Version:CSS1JavaScriptsyntax:object.style.borderBott...
ExampleSet the style of the bottom border for different elements:
h1 { border-bottom: 5px solid red;}h2 { border-bottom: 4px dotted blue;}
div { border-bottom: double;}
Try it Yourself »[1] Definition and UsageThe border-bottom property is a shorthand property for (in the following order):
If border-bottom-color is omitted, the color applied will be the color of the text.
Show demo ❯[2]
Default value: medium none color Inherited: no Animatable: yes, see individual properties. Read about animatable[3] Try it[4] Version: CSS1 JavaScript syntax: object.style.borderBottom="15px dotted lightblue" Try it[5] Browser SupportThe numbers in the table specify the first browser version that fully supports the property.
Property border-bottom 1.0 4.0 1.0 1.0 3.5 CSS Syntaxborder-bottom: border-width borde...