Page Widget How to - Customize the 2 colors in border style








Question

We would like to know how to customize the 2 colors in border style.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.boo {<!-- w ww  .  j a v a 2s .com-->
  border-left: 6px solid red;
}

p {
  border-left: 6px solid blue;
}
</style>
</head>
<body>
  <div class="boo">
    <p>This is a test</p>
  </div>
</body>
</html>

The code above is rendered as follows: