Andrew
Andrew

Reputation: 83

Rounded shape div

I have a post div which sits on top of a weird background, and as you can see in this screenshot https://i.sstatic.net/L5Qj0.png the text runs over the area I would want it to. I tried to use border-radius, but unfortunately that only modifies the look of the div, with the text still running over.

What I am trying to accomplish here is to create some sort of shape for the div's top right corner, in which the text will sit. I've tried to use some weird padding but that didn't do the trick either. Any ideas would be much appreciated.

Upvotes: 2

Views: 1069

Answers (2)

Jitender
Jitender

Reputation: 7971

it will work

 border-top-right-radius:400px;

Upvotes: 2

Starx
Starx

Reputation: 78941

This is bug, do not give a radius that is bigger than the half of the container's height. Only till this, it is efficient enough.

However, as an alternative take a look into this CSS Text Wrapper, this is exactly what you want.

Upvotes: 1

Related Questions