The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Text background per each line?
How can I achieve having text background per each line with a gap without the background color between the lines of text?
What I aim for is shown here – https://www.dropbox.com/s/cz3gxgyc2gaxi76/2015-01-30%2010.52.36.png?dl=0
Hey! Try something like this. Use pseudo classes.
What if the title is a single H2 element… A title of a blog post which can show as a single line but depending on the screen size / device can break into more than just one line?
I think JS will help.
Chris did an article on the this just recently.
https://css-tricks.com/fun-line-height/