HTML Element Style How to - Add border to div rows


We would like to know how to add border to div rows.


<!DOCTYPE html>
<style type='text/css'>
<!--from   ww  w. ja  v a  2 s .  c o m-->
body {
  padding-top: 20px;
  padding-bottom: 40px;

.container {
  width: 420px;

div.row {
  border: 1px solid;
  border-bottom: 0px;

.container div.row:last-child {
  border-bottom: 1px solid;
  <div class="container">
    <div class="row heading">
      <div class="col-md-12">Header</div>
    <div class="row subheading">
      <div class="col-md-12">Some text</div>
    <div class="row footer">
      <div class="col-md-12">Footer</div>

The code above is rendered as follows: