Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a rounded corner background box using CSS?

Tags:

html

css

How to create a rounded corner background box using CSS?

like image 885
DEVOPS Avatar asked Dec 17 '22 22:12

DEVOPS


2 Answers

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

like image 200
Pavel Nikolov Avatar answered Jan 17 '23 14:01

Pavel Nikolov


This is only supported in CSS 3.

like image 41
kgiannakakis Avatar answered Jan 17 '23 15:01

kgiannakakis