Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to make rounded or custom border radius css

I was searching for website references and found a website with a cool image header.
here is the image header from the website
enter image description here

It has border-radius on the bottom left and bottom right corner, so make the image looks so cool.
I’ve tried using border-bottom-left-radius and border-bottom-right-radius. but it doesn’t look the same. here is code that I’ve tried

#image-header{
   height:100px;
   width:500px;
   border-bottom-left-radius: 2rem;
   border-bottom-right-radius: 2rem;
   background:green;
}

Can I achieve this only using CSS?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Here is how you can do it:

#image-header {
  height: 100px;
  width: 500px;
  background: green;
  border-radius: 60% / 20%;
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
}
<div id="image-header"></div>

Try adjusting the percentage values, in the border-radius property until you get your desired results.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading