Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS border-radius bleed with dark colors

Tags:

css

I've got a containing box that has a border-radius then I have an element within the container that also has a border-radius set, and it butts up against the edges of the box.

The containing box is "bleeding" around the edges of the interior box:

enter image description here

You can see it in action here: http://jsfiddle.net/Shpigford/RUAMx/

How can I fix this?

like image 382
Shpigford Avatar asked May 10 '26 21:05

Shpigford


1 Answers

It's easy to fix setting bigger radius for container border:

div {
    background:white;
    border-radius: 5px 8px 8px 5px;
}

See here http://jsfiddle.net/RUAMx/2/

In addition you don't have to use -webkit and -moz preffixes anymore, support for border-radius is good enough.

like image 176
dfsq Avatar answered May 12 '26 10:05

dfsq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!