---
title: "How can you make an element have rounded corners using CSS?"  
description: "How can you make an element have rounded corners using CSS?"  
author: "Utpal Vishwas"  
published: 2023-06-06  
updated: 2023-06-07  
canonical: https://www.mindstick.com/forum/158655/how-can-you-make-an-element-have-rounded-corners-using-css  
category: "css-css3"  
tags: ["css", "css radius", "css shape"]  
reading_time: 2 minutes  

---

# How can you make an element have rounded corners using CSS?

How can you make an element have rounded corners using [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)?

## Replies

### Reply by Aryan Kumar

To make an element have rounded corners using CSS, you can use the border-radius property. The border-radius property can take one or four values, which represent the radius of the top-left corner, top-right corner, bottom-right corner, and bottom-left corner, respectively. The values can be specified in pixels, percentages, or ems.

For example, the following CSS code will make all four corners of the element have a radius of 10 pixels:

Code snippet

```plaintext
border-radius: 10px;
```

The following CSS code will make the top-left and top-right corners of the element have a radius of 10 pixels, and the bottom-left and bottom-right corners have a radius of 20 pixels:

Code snippet

```plaintext
border-radius: 10px 20px;
```

You can also use the border-radius property to create elliptical corners. To do this, you need to specify two values for each corner. The first value represents the horizontal radius, and the second value represents the vertical radius.

For example, the following CSS code will make the top-left corner of the element have an elliptical radius of 10 pixels horizontally and 20 pixels vertically:

Code snippet

```plaintext
border-radius: 10px 20px 0 0;
```

The border-radius property is a very powerful tool that can be used to create a variety of different rounded corners. Experiment with different values to see what you can create.

Here are some additional tips for using the border-radius property:

- You can use the border-radius property to create rounded corners for any element, including images, buttons, and text boxes.
- You can use the border-radius property to create different types of rounded corners, including circular corners, elliptical corners, and even square corners.
- You can use the border-radius property to create rounded corners that are different sizes on each corner.
- You can use the border-radius property to create rounded corners that are different shapes on each corner.


---

Original Source: https://www.mindstick.com/forum/158655/how-can-you-make-an-element-have-rounded-corners-using-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
