Page Widget How to - Overlap to create custom border








Question

We would like to know how to overlap to create custom border.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.inner {<!--from  ww w  .  ja v a2  s .  co m-->
  padding: 5px;
  border: 15px solid red;
  border-top: 0;
}

.outer {
  border-top: 15px solid teal;
}
</style>
</head>
<body>
  <div class="outer">
    <div class="inner">test</div>
  </div>
</body>
</html>

The code above is rendered as follows: