CSS border-right Property







googletag.cmd.push(function() { googletag.display('div-gpt-ad-1422003450156-2'); });




CSS border-right Property



Previous
Complete CSS Reference
Next



Example


Set the style of the right border for different elements:



h1 {
    border-right: 5px solid red;
}

h2 {
   
border-right: 4px dotted blue;
}

div {
   
border-right: double;
}

Try it Yourself »



Definition and Usage


The border-right property is a shorthand
property for (in the following order):



  • border-right-width


  • border-right-style (required)

  • border-right-color


If border-right-color is omitted, the color applied will be the color of the
text.
























Default value: medium none color
Inherited: no
Animatable: yes, see individual properties. Read about animatable
Try it
Version: CSS1
JavaScript syntax: object.style.borderRight="5px dotted blue"
Try it




Browser Support


The numbers in the table specify the first browser version that fully supports the property.




















Property
border-right 1.0 4.0 1.0 1.0 3.5









googletag.cmd.push(function() { googletag.display('div-gpt-ad-1493883843099-0'); });






CSS Syntax



border-right: border-width border-style border-color|initial|inherit;


Property Values




























Value Description
border-right-width Required. Specifies the width of the right border. Default value is
"medium"
border-right-style Required. Specifies the style of the right border. Default value is
"none"
border-right-color Optional. Specifies the color of the right border. Default value is the
color of the text
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit




Related Pages


CSS tutorial: CSS Border


HTML DOM reference: borderRight property





Previous
Complete CSS Reference
Next

Popular posts from this blog

Chat program with C++ and SFML

Function to Return a JSON Like Objects Using VBA Collections and Arrays

Will my employers contract hold up in court?