2

I have 4 circles and I want to show lines between these circles, just a way to show that the circles are connected to each other.

.circle {
    height: 30px;
    width: 30px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin-left: 40px;
  }
<div>
  <span class="circle"></span>
  <span class="circle"></span>
  <span class="circle"></span>
  <span class="circle"></span>
</div>

I tried adding <hr/> after every <span> element, however, this is creating lines on next line, any ideas?

fiddle: https://jsfiddle.net/9qyvzehw/

Thanks!

Nasser Ali Karimi
  • 4,462
  • 6
  • 34
  • 77
user1234
  • 3,000
  • 4
  • 50
  • 102

1 Answers1

2

Try this one:

.circle {
  height: 30px;
  width: 30px;
  background-color: #bbb;
  border-radius: 50%;
  float: left;
  margin: 0px;
  padding: 0px;
}
.line{
  height: 2px;
  width: 40px;
  background-color: #bbb;
  float: left;
  margin: 14px 0px;
  padding: 0px;
}
.clear{
  clear: both;
}
<div>
  <span class="circle"></span>
  <span class="line"></span>
  <span class="circle"></span>
  <span class="line"></span>
  <span class="circle"></span>
  <span class="line"></span>
  <span class="circle"></span>
  <span class="clear"></span>
</div>
SamratV
  • 224
  • 2
  • 12