is there a way to prevent overflowing other than padding ?
I want it to almost touch the border radius

8 Replies
How have you created it (code)?
any possible answers will probably depend on how you have added the grey shape behind the text.
do you want html too ?
`css
It is not possible to know what you are doing with that small snippet of code.
As always, the best thing to do would set up a Codepen with all the relevant code.
go to small screens š
this makes me break out into a cold sweat, please just do
body
for the selector š
border-radius is basically a decorative effect, it doesn't change the size of the box itself.
With only a little padding on the right side, with such a big border radius, you can't do much about it... but you could remove this from inside your media query:
Either reduce the border radius at small sizes, or increase the padding to keep the text clear... or at least, that's all I can think of at the moment.
Something like shape-inside
would be handy here, but it's not currently something we have... we have shape-outside
which you could use if you want to keep the padding small, but I think it would be a little annoying to set it up for this ype of shape.This is what I was trying to achieve but, as I say, the issue is the height as clearly this expands as the viewport gets narrower.
⦠of course we could define the height of the parent as an inline style using JS š¤
