I am trying to insert a circle but don't want an image to use. Can I draw a circle using css. Thanks.

Recommended Answers

All 4 Replies

I have solved the problem by using this code bellow:

.circle {
  height: 70px;
  width: 70px;
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  border-radius: 50%;
  background: yellow;
}
.circle {
    border-radius: 100%;
    width: 100px;
    height: 100px;
    background: #FF0000;
}

Give that a shot!
Not tested.

Just as an additional note... the border-radius property is supported in IE9+, Firefox, Chrome, Safari, and Opera. If you access the page using IE 8 or eariler, you will see a square instead of a circle.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.