Rishi Rishi - 17 days ago 5
CSS Question

Three Dots inside Round <div>

I wish to make a circle

<div>
, as per this image:

here is the image




I have tried this code.



.discussion:after {
content: '\2807';
font-size: 1em;
background: #2d3446;
width: 20px;
height: 20px;
border-radius: 100px;
color:white;
}

<div class="discussion"></div>








How can I do this correctly?

Answer

Use this code.

.discussion {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  background: #2d3446;
}

.discussion:after {
  content: '\2807';
  font-size: 1em;
  color:white;
  position: absolute;
  left: 6px;
}
<div class="discussion"></div>

Hope this helps!

Comments