.cmenu{width:100px;height:100px;display:block;border-radius:50px;-moz-border-radius:50px;-webkit-border-radius:50px;-khtml-border-radius:50px;background:#000;font-size:20px;color:#fff;line-height:100px;text-decoration:none;text-align:center} .cmenu:hover{color:#fff;text-decoration:none;background:#333} .stylish{width:100px;height:100px;display:block;border-radius:66px;-moz-border-radius:66px;-webkit-border-radius:66px;-khtml-border-radius:66px;border:#ccc 4px double;background:#ddd;font-size:20px;color:#888;line-height:100px;text-shadow:0 1px 0 #fff;text-decoration:none;text-align:center} .stylish:hover{border:#bbb 4px double;color:#aaa !important;text-decoration:none;background:#e6e6e6} Making circles with CSS3 is very simple, but not very well supported with older browsers. If your design depends on circles you should definitely use background images instead.However, if your audience is tech savvy (meaning they'll likely have the very latest technology to view your site) or you feel it's otherwise safe to start using CSS3 on your site the following styles will work in the latest versions of Firefox, Chrome, Safari, and even IE:Code Last Refreshed: October 31st, 2011 Plain Circle With or Without Text InsideHelloCSS .circle{ width:100px; height:100px; display:block; border-radius:50px; -moz-border-radius:50px; -webkit-border-radius:50px; -khtml-border-radius:50px; font-size:20px; color:#fff; line-height:100px; text-align:center; background:#000} HTML Hellogoing a step further...Clickable Link Circle Button Hello CSS .button{ width:100px; height:100px; display:block; border-radius:50px; -moz-border-radius:50px; -webkit-border-radius:50px; -khtml-border-radius:50px; font-size:20px; color:#fff; line-height:100px; text-align:center; background:#000} HTML Hellogoing even a step further...Menu Hover Effect Circle Button Hello CSS .menu{ width:100px; height:100px; display:block; border-radius:50px; -moz-border-radius:50px; -webkit-border-radius:50px; -khtml-border-radius:50px; font-size:20px; color:#fff; line-height:100px; text-decoration:none; text-align:center; background:#000}.menu:hover{ color:#fff; text-decoration:none; background:#333} HTML Helloand getting really stylish...Stylish Menu Hover Effect Circle Button Hello CSS .stylish{ width:100px; height:100px; display:block; border-radius:66px; -moz-border-radius:66px; -webkit-border-radius:66px; -khtml-border-radius:66px; border:#ccc 4px double; font-size:20px; color:#888; line-height:100px; text-shadow:0 1px 0 #fff; text-decoration:none; text-align:center; background:#ddd}.stylish:hover{ border:#bbb 4px double; color:#aaa; text-decoration:none; background:#e6e6e6} HTML HelloSo, just make the radius half of the width and height to make a perfect circle. If you need any help don't hesitate to ask in the comments below.Thanks for reading, Bryan
Making circles with CSS3 is very simple, but not very well supported with older browsers. If your design depends on circles you should definitely use background images instead.
However, if your audience is tech savvy (meaning they’ll likely have the very latest technology to view your site) or you feel it’s otherwise safe to start using CSS3 on your site the following styles will work in the latest versions of Firefox, Chrome, Safari, and even IE:
Code Last Refreshed: October 31st, 2011
Plain Circle With or Without Text Inside
Hello
CSS
.circle{
width:100px;
height:100px;
display:block;
border-radius:50px;
-moz-border-radius:50px;
-webkit-border-radius:50px;
-khtml-border-radius:50px;
font-size:20px;
color:#fff;
line-height:100px;
text-align:center;
background:#000}
HTML
<div class="circle">Hello</div>
going a step further…
Clickable Link Circle Button
Hello
CSS
.button{
width:100px;
height:100px;
display:block;
border-radius:50px;
-moz-border-radius:50px;
-webkit-border-radius:50px;
-khtml-border-radius:50px;
font-size:20px;
color:#fff;
line-height:100px;
text-align:center;
background:#000}
HTML
<a href="#" class="button">Hello</a>
going even a step further…
Menu Hover Effect Circle Button
CSS
.menu{
width:100px;
height:100px;
display:block;
border-radius:50px;
-moz-border-radius:50px;
-webkit-border-radius:50px;
-khtml-border-radius:50px;
font-size:20px;
color:#fff;
line-height:100px;
text-decoration:none;
text-align:center;
background:#000}
.menu:hover{
color:#fff;
text-decoration:none;
background:#333}
HTML
<a href="#" class="menu">Hello</a>
and getting really stylish…
Stylish Menu Hover Effect Circle Button
Hello
CSS
.stylish{
width:100px;
height:100px;
display:block;
border-radius:66px;
-moz-border-radius:66px;
-webkit-border-radius:66px;
-khtml-border-radius:66px;
border:#ccc 4px double;
font-size:20px;
color:#888;
line-height:100px;
text-shadow:0 1px 0 #fff;
text-decoration:none;
text-align:center;
background:#ddd}
.stylish:hover{
border:#bbb 4px double;
color:#aaa;
text-decoration:none;
background:#e6e6e6}
HTML
<a href="#" class="stylish">Hello</a>
So, just make the radius half of the width and height to make a perfect circle.
If you need any help don’t hesitate to ask in the comments below.
Thanks for reading, Bryan
Other Reads: