6

I am making this page where I wanted a rounded box in the middle. My issue is (as seen in the picture) that I have a div with background-color that is overlapping the div behind with the border-radius.

Her is the image!

4
  • 3
    Please post your HTML and CSS code
    – chrki
    Jul 4, 2017 at 19:58
  • 1
    Have you tried overflow: hidden? Jul 4, 2017 at 20:00
  • Also, note that if you use < table >, you'll have problems with border radius.
    – JFC
    Jul 4, 2017 at 20:06
  • I added the overflow: hidden - to the div and it worked!
    – SwahgnerDK
    Jul 4, 2017 at 20:12

1 Answer 1

13

On the outer div(the one with the border radius) add overflow:hidden. If for whatever reason you want to avoid that, you can also add an additional border radius to the child element.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.