Q: Как сделать фоновые рамки при помощи div'ов? 
Как можно реализовать такой фон в виде рамок?
Никак не получается реализовать такие рамки при помощи пустых div'ов. 
<meta charset="utf-8">
<html>

<head>
<style>
    .top_board {
        background-color: grey;
        width: 100%;
        height: 10%;
        #border: 1px solid red;
        background-image: url(background_img.png);

    }

    .middle {
        #border: 1px solid green;

    }

    .bottom_board {
        #border: 1px solid red;
        width: 100%;
        height: 5%;
        background-color: grey;
        background-image: url(i.png);
    }

    .left_board {
        #border: 1px solid red;
        width: 50px;
        float: left;
        height: 100%;
        background-color: grey;
        background-image: url(i.png);


    }

    .content {
        border: 1px solid red;
    }

    .right_board {
        3border: 1px solid red;
        width: 50px;
        float: right;
        height: 100%;
        background-image: url(i.png);

    }


</style>
</head>

    <body>


        <div class="top_board">
        </div>
        <div class="middle">
            <div class="left_board">

            </div>

            <div class="right_board">

            </div>

            <div class="content">
        <br>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        <br>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quo assumenda, laboriosam, nisi illum, animi quis iusto eligendi error incidunt nemo, nulla repellat? Culpa, sunt, amet! Dicta et sed, consequuntur dolor!    
        <br>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi delectus quia ipsum vitae dolores, optio quidem, nemo excepturi maxime minus culpa ipsa adipisci hic fuga perspiciatis nam qui autem voluptatum.     
            </div>


        </div>

        <div class="bottom_board">

        </div>

    </body>

</html>


A: Через before/after и background-image например:


.test {
  width: 100px;
  height: 100px;
  position: relative;
  border-top: 3px solid black;
  background: red;
}
.test:before, .test:after {
  content: "";
  position: absolute;
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#000), to(#000));
  background-image: -webkit-linear-gradient(#000, #000);
  background-image: -moz-linear-gradient(#000, #000);
  background-image: -o-linear-gradient(#000, #000);
  background-image: linear-gradient(#000, #000);
    top: -3px;
    bottom: -3px;
    width: 3px;
    height: 20px;
}
.test:before {
  left: -3px;
}
.test:after {
  right: -3px;
}

body {
  background: green;
}
<div class="test"></div>


