Root: WRM Database > Information Technology > Programming Languages > CSS > Properties > "border" Property > The CSS "border" Property



The CSS "border" Property


When configuring the CSS "border" property you can set all the border properties in one declaration. Here are the border properties in order:

  1. border-width
  2. border-style
  3. border-color



Here's a couple examples of the CSS "border" property:

test p1

test p2

test p in a div1

test p in a div2

test div1
test div2


Here's what the code looks like:

<p style="border: 2px solid white;">test p1</p>
<p style="border: 2px solid white;">test p2</p>
<div style="border: 2px solid white;"><p>test p in a div1</p></div>
<div style="border: 2px solid white;"><p>test p in a div2</p></div>
<div style="border: 2px solid white;">test div1</div>
<div style="border: 2px solid white;">test div2</div>