-2

I am trying to make this border

black border: 2px

white border: 1 px with border radius 4 px

Issue - I have tried using pseudo elements but not able to fill corners, its looking like this image below

what i have achieved with pseudo elements

Can i have the css to get this desired border?

  • 1
    Please show the _code_ of what you already have tried ([mre]), instead of just screenshots. – CBroe May 05 '22 at 12:05

1 Answers1

0

Might be wrong, but I think the the black one is not a border indeed; just a div:

body {
  background-color: red;
}

#black-border {
  background-color: black;
  width: 250px;
  height: 150px;
  padding: 10px 15px;
}

#white-border {
  border: 8px solid white;
  background-color: white;
  border-radius: 15px;
  height: 132px;
}
#inner-red {
  background-color: red;
  width: 100%;
  height: 100%;
  border-radius: 5px;
}
<div id="black-border">
  <div id="white-border">
    <div id="inner-red"></div>
  </div>
</div>
ask4you
  • 768
  • 3
  • 14