Rounded Corners for Tables and Boxes

Rounding the Corners of Boxes and Tables

In the example below, the html element named box1 has rounded corners.

Rounded corners can be obtained with the border-radius property in CSS3. New versions of all browsers recognize this feature.

However, for older versions of browsers, it is necessary to use a prefix such as -webkit- or -moz-.

It has been used in all ways in the example to ensure that it works in as many browsers as possible.

For rows that contain a radius, the amount of rounding the corners is adjusted. In the lines with shadow, the table or box is shaded.

It is not necessary to use both shadow and radius properties together. If desired, only radius or shadow can be used.

These css codes will not work in very old versions of browsers.

#box1

{

background-color:#ffffff;

color: #696969;

width: 360px;

padding: 7px;

-webkit-border-radius: 10px;

-moz-border-radius: 10px;

border-radius: 10px;

-moz-box-shadow: 0 0 5px #779900;

-webkit-box-shadow: 0 0 5px #779900;

box-shadow: 0 0 5px #779900;

    }

Rounding Each Corner a Different Amount

If we wish, we can apply rounding to each corner of the objects with different angles. 

border-top-left-radius: 20px;

border-top-right-radius: 50px;

border-bottom-right-radius: 30px;

border-bottom-left-radius: 5px;

Also, all vertices can be specified in one line:

border-radius: 20px 50px 30px 5px; 

border-radius: 20px 50px; 

border-radius: 15px 50px 30px:

In such uses, all corners can be specified in clockwise order starting from the top left. 

Creating Elliptical Corners

Instead of making the corners circular, we can also make them elliptical. Check out the topic examples section.

border-radius: 20px/50px; 

border-radius: 50px/20px;

border-radius: 50%;

 

round css table corners, round box corners, round corners of table, radius, css oval corner, css round corner

EXERCISES

CSS3 Rounded Corners Examples Try It
Rounding the corners of tables or boxes and applying shadow effect Try It

You can apply rounded border and shadow effect to html elements with the following CSS class. Click the button above to try it.

.boxRounded

{

background-color:#ffffff;

color: #696969;

width: 360px;

padding: 7px;

-webkit-border-radius: 10px;

-moz-border-radius: 10px;

border-radius: 10px;

-moz-box-shadow: 0 0 5px #779900;

-webkit-box-shadow: 0 0 5px #779900;

box-shadow: 0 0 5px #779900;

    }

 



COMMENTS




Read 603 times.

Online Users: 189



rounded-corners