Let's take for example :
<div id="div1">This is a sentence.</div>
The <div>
fill up 100% of the line.
The text itself, just a little portion of that.
I want to give the text a background color WITHOUT giving the whole line a background color.
I can change the html and add a span
of course. (And use this span with background-color
)
<div id="div1"><span>This is a sentence.</span></div>
But is it possible in pure css, without changing the html ?
PS : I'm making a css code for hyper
terminal.
SOLUTION (for all div) :
div{display:table;}
This totally destroy tmux
behavior (inside hyper
) but maybe i'm asking for too much...
echo -e "\n\n"
also becomes a problem. :p
SOLUTION FOR THIS PROBLEM : (empty div take no space)
div:after{content: " ";}