<!doctype html>
<meta charset="utf-8">
<style>
  #box {
    width: 200px;
    height: 200px;
  }
  #top {
    border-left: 100px solid blue;
    border-right: 100px solid black;
    height: 100px;
  }
  #bottom {
    border-left: 100px solid green;
    border-right: 100px solid red;
    height: 100px;
  }
</style>
<div id="box">
  <div id="top"></div>
  <div id="bottom"></div>
</div>
