how to make a div border below corner like in this below image in css.
Asked
Active
Viewed 144 times
0

Ahsan Ullah
- 158
- 4
- 15
-
Consider using SVG. – Wais Kamal Jun 07 '20 at 14:40
-
@WaisKamal can we achieve it through css? – Ahsan Ullah Jun 07 '20 at 14:41
-
I don't think so. – Wais Kamal Jun 07 '20 at 14:42
-
have you tried border-radius – godfather Jun 07 '20 at 14:50
-
@godfather nope border radius will not work – Ahsan Ullah Jun 07 '20 at 14:54
1 Answers
1
You can hack using multiple elements like this:
.d1 {
width: 100px;
height: 100px;
background-color: #00f;
}
.wrapper {
width: 100px;
height: 20px;
background-color: #fff;
margin-top: -20px;
}
.d2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #00f;
}
.wrapper2 {
width: 100px;
height: 10px;
background-color: #00f;
margin-top: -20px;
position: absolute;
}
<div class="d1"></div>
<div class="wrapper">
<div class="d2"></div>
</div>
<div class="wrapper2"></div>

Tân
- 1
- 15
- 56
- 102