0

Trying to create this shape with css

enter image description here

I've managed to get to this result

enter image description here

but can't figure out how to create the arc in the bottom part of the rectangle this is my css

.left-page {             
         color: hsl(35, 35, 35);
         border-top-left-radius:  26px;
         border-bottom-left-radius:  26px;
         border: solid 1px hsl(274,65,35);
         
    }
1
  • would it be easier to just use an image and set it as the background? if not, one thing you can do is add a ::before or ::after selector (or actual element) that's position absolute, and round it, but that's gonna be a real headache Commented Apr 16, 2021 at 20:22

2 Answers 2

0

you can try something like this but i dont think this is a great idea:

.shape {
  width: 400px;
  height: 400px;
  background: red;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  position: relative;
 
}

.shape::after {
  content: '';
  background: red;
  width: calc(100% - 15px);
  height: 40px;
  position: absolute;
  bottom: -17px;
  right: 0;
  border-radius: 50%;
}
<div class='shape'>

</div>

Sign up to request clarification or add additional context in comments.

Comments

0

You can use a bottom 'footer' (or after pseudo element) to illustrate the effect you're looking for.

.content {
  width: 200px;
  height: 300px;
  
  border: 1px solid purple;
  border-bottom: none;
  
  border-top-left-radius: 32px;
}

.bottom {
  width: 200px;
  height: 50px;
  
  border-bottom: 1px solid purple;
  border-left: 1px solid purple;
  border-right: 1px solid purple;
  
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}
<div class="container">
  <div class="content">
  
  </div>
  <div class="bottom"></div>
</div>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.