Motyar

@motyar

Freelance Web Developer

Static Web Hosting, made easy

Dec 18, 2009

Draw circle with css and Html

Really it was a new thing for me.. (may be not for you).
This code was used in my design to avoid a png image.(Although you will see a rectangle in IE )



<html>
<head>
<style>
div.circle {
width: 57px;
height: 57px;
background: pink;
border-radius: 28px;
-moz-border-radius: 28px;
-webkit-border-radius: 28px;
filter:alpha(opacity=54);
-moz-opacity:0.54;
-khtml-opacity: 0.54;
opacity: 0.54;
display: block;
position: absolute;

}
.circle {
top: 0px !important;
}
</style>
</head>
<body>
<div class=circle ></div>
</body>
</html>

here is the demo

Labels:




By :