Problem with padding for text set to inline with background color

update: my problem is almost solved but i still cant get the padding to work on all textlines, it only changes the first line when i add padding :frowning:

new public link

hello, im trying to create something like what i provided in the image. a text with a background color that has spacing in between the lines.

thanks in advance from a swiss noob :grinning:

Hey @Multiwikimedia you can adjust the line height to effectively add spacing between each line. :slight_smile:

thank you @waldo but what about the left and right padding? the padding only affects the first and last word :frowning:

Hey @Multiwikimedia you’ll need to add the padding to the parent element “insidetext” :slight_smile:

@waldo but what i want is, that the background color doesnt move, just the text, thats what i meant with padding left and right :smile:

like this

but when i adjust the parent element, everything moves.

Hey @Multiwikimedia as far as I am aware there isn’t a way to add inline-text styles to multi-line text elements how you’d like to have it styled unfortunately. :confused:

okay, thank you anyway @waldo

Unfortunately this is something that’s not really supported in CSS natively :\

See for some custom code workarounds, which are all pretty hacky unfortunately :grimacing:

thank you so much @callmevlad! :grinning:

the solution was to add an inner and outer shadow, im happy now!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.