How to create a rounded corner background box using CSS?
+6
A:
Use this css:
.box_round {
-moz-border-radius: 12px; /* FF1+ */
-webkit-border-radius: 12px; /* Saf3-4 */
border-radius: 12px; /* Opera 10.5, IE 9, Saf5, Chrome */
}
And then simply use the class in your HTML like this
<div class="box_round" style="background-color:red">This is a test</div>
I added the background-color:red - just for test puporposes so that you can see the rounded corenrs.
HTH
Pavel Nikolov
2010-08-31 10:13:33
Hi thank you very much.
learner
2010-08-31 12:23:31
Hi Pavel Nikolov its not working with IE8. How can I fix this problem?
learner
2010-08-31 12:39:08
You cannot! Only IE 9 will support CSS3. The previous versions have no support for roudend corenrs!
Pavel Nikolov
2010-08-31 13:19:27