Padding not working on all text lines

I am adding background colour to the text but can’t get the padding work for all text lines. Is there anyway to apply the padding (left and right) to the all text line? Seems like there must be a very simple solution for this. Thanx in advance!

hi @sb_web The padding properties specify the width of the padding area of a box. this mean that padding has nothing to do with text. You can knowledge your self about that on MDN, W3C or other website that contain CSS documentation.

Anyway there is a several ways to create effect you are trying achieve. Here is one example that use SVG.

EDIT: I have now created simple example of highlighter if it will do for you. but AFAIK Webflow doesn’t support <mark> natively but I can be mistaken. It is up to you to find out if WF offer it in UI.

1 Like

Thanks a lot, Stan! First option seems to be the way to do it on webflow.

1 Like

hi @sb_web the SVG example is about round “inside” corners and flow but if you would like to have only space around you do not need this SVG as CSS do the job, more specifically box-decoration-break: clone;. You can see result when you comment out SVG.

1 Like