Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a line with circle in the middle

So, I'm trying to achieve this result:

line with circle in the middle

This is what I got when I tried: https://jsfiddle.net/wvdkmjge/

.container {
  width: 100px;
  height: 1px;
  background-color: black;
}
.circle {
  display: inline-block;
  vertical-align: middle;
  width: 10px;
  height: 10px;
  background-color: transparent;
  border: solid 1px black;
  border-radius: 50%;
}
<div class="container">
  <div class="circle">

  </div>
</div>

Moreover, I want that I'll not see the border line on the circle. Any suggestions?

like image 892
Web R Avatar asked Jan 23 '16 21:01

Web R


1 Answers

Try this:

.container {
  width: 100px;
  height: 1px;
  background-color: black;
  position: relative;
}
.circle {
  position: absolute;
  top: -5px;
  left: 50%;
  margin-left: -5px;
  display: inline-block;
  vertical-align: middle;
  width: 10px;
  height: 10px;
  background-color: transparent;
  border: solid 1px black;
  border-radius: 50%;
}
<div class="container">
  <div class="circle">

  </div>
</div>
like image 115
winhowes Avatar answered Oct 26 '22 17:10

winhowes