Streaming live at 10am (PST)

Problem with padding for text set to inline with background color


#1

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 https://preview.webflow.com/preview/testnoobsite?preview=4c3df89ed53c965f45fa035897bc822d

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:


#2

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


#3

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


#4

Hey @Multiwikimedia you'll need to add the padding to the parent element "insidetext" :smile:


#5

@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.


#6

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:


#7

okay, thank you anyway @waldo


#8

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

See https://css-tricks.com/multi-line-padded-text/ for some custom code workarounds, which are all pretty hacky unfortunately :grimacing:


#9

thank you so much @callmevlad! :grinning:

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

https://preview.webflow.com/preview/testnoobsite?preview=4c3df89ed53c965f45fa035897bc822d


#10

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