Connecting vertical lines between CSS elements that are part of a table's rows

Use the :before pseudo element this way:

* {font-family: 'Segoe UI'; font-size: 10pt;}
.circle {position: relative; border: 2px solid #999; border-radius: 100%; width: 50px; line-height: 50px; text-align: center; margin-top: 50px; background-color: #fff; z-index: 2;}
.circle:first-child {margin-top: 0;}
.circle:before {position: absolute; border: 1px solid #999; width: 0; height: 50px; display: block; content: ''; left: 50%; z-index: 1; top: -54px; margin-left: -1px;}
.circle:first-child:before {display: none;}
<div class="circle">Step 1</div>
<div class="circle">Step 2</div>
<div class="circle">Step 3</div>


You do have to give your :before element a width and a height if you want ti to appear as a line. Have a look at this:

.circle {
  height: 45px;
  width: 45px;
  border-radius: 50%;
  border: 2px solid;
  position: relative;
  border-color: #889EB7;
}

.circle:before {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
  border: 1px dotted;
  border-width: 0 0 0 1px;
  width: 1px;
  height: 100px;
}
<div class='circle'></div>

Tags:

Css