How to apply background color with css to text with line break

Just tried it out this isn’t looking exactly like you want but just wanted to see if it’s possible so you’ll have to mess around with the settings a bit to get it like that but first

image

Get a div and make it a block

Add the first css to this element

Then put a text box inside this element like in the first photo and add that second bit of css to the text element

Should get you this result, I did mess around with other settings but I think as long as you do a div that is a block with some text inside it should work then just play around with the design to get the desired effect.

I made the width of the div fixed as well just so it works

Also i couldn’t see what I was typing when I done this which I wasn’t sure why but just be aware that you might have to copy and paste it or something

1 Like