---
category: Display
created: '2021-05-09'
description: Create concave corners with CSS
keywords: css border radius, css concave border radius, css concave corners
thumbnail: /assets/css-layout/thumbnails/concave-corners.png
title: Concave corners
---

## HTML

```html index.html
<div class="concave-corners">
    <!-- The top-left corner -->
    <div class="concave-corners__corner concave-corners__corner--tl"></div>

    <!-- The top-right corner -->
    <div class="concave-corners__corner concave-corners__corner--tr"></div>

    <!-- The bottom-left corner -->
    <div class="concave-corners__corner concave-corners__corner--bl"></div>

    <!-- The bottom-right corner -->
    <div class="concave-corners__corner concave-corners__corner--br"></div>

    <!-- Content -->
    ...
</div>
```

## CSS

```css styles.css
.concave-corners {
    background-color: #d1d5db;

    /* Used to position the corners */
    position: relative;
}
.concave-corners__corner {
    /* Absolute position */
    position: absolute;

    /* Size */
    height: 1rem;
    width: 1rem;

    background: #fff;
}

.concave-corners__corner--tl {
    /* Position */
    left: 0;
    top: 0;

    /* Border radius */
    border-radius: 0 0 1rem 0;
}

.concave-corners__corner--tr {
    /* Position */
    right: 0;
    top: 0;

    /* Border radius */
    border-radius: 0 0 0 1rem;
}

.concave-corners__corner--bl {
    /* Position */
    bottom: 0;
    left: 0;

    /* Border radius */
    border-radius: 0 1rem 0 0;
}

.concave-corners__corner--br {
    /* Position */
    bottom: 0;
    right: 0;

    /* Border radius */
    border-radius: 1rem 0 0 0;
}
```

<Playground>
```css styles.css hidden
body {
    height: 24rem;
}
.concave-corners {
    background-color: #d1d5db;

    /* Used to position the corners */
    position: relative;

    /* Misc */
    height: 100%;
    width: 100%;
}
.concave-corners__corner {
    /* Absolute position */
    position: absolute;

    /* Size */
    height: 1rem;
    width: 1rem;

    background: #fff;
}

.concave-corners__corner--tl {
    /* Position */
    left: 0;
    top: 0;

    /* Border radius */
    border-radius: 0 0 1rem 0;
}

.concave-corners__corner--tr {
    /* Position */
    right: 0;
    top: 0;

    /* Border radius */
    border-radius: 0 0 0 1rem;
}

.concave-corners__corner--bl {
    /* Position */
    bottom: 0;
    left: 0;

    /* Border radius */
    border-radius: 0 1rem 0 0;
}

.concave-corners__corner--br {
    /* Position */
    bottom: 0;
    right: 0;

    /* Border radius */
    border-radius: 1rem 0 0 0;
}
```

```html index.html hidden
<div class="concave-corners">
    <div class="concave-corners__corner concave-corners__corner--tl"></div>
    <div class="concave-corners__corner concave-corners__corner--tr"></div>
    <div class="concave-corners__corner concave-corners__corner--bl"></div>
    <div class="concave-corners__corner concave-corners__corner--br"></div>
</div>
```
</Playground>
