- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 19 Jan 2010 16:09:04 -0600
- To: Kenneth Kufluk <kenneth@kufluk.com>
- Cc: www-style@w3.org
On Tue, Jan 19, 2010 at 8:37 AM, Kenneth Kufluk <kenneth@kufluk.com> wrote: > When adding a background to wrapped text, it is not currently possible > to add padding to the wrapped line endings. > > For example: > <div style="width:100px"> > <span style="background:blue;line-height:1.5em;padding:0.5em">One > two three four five six seven eight nine ten.</span> > </div> > > This will show the following text with a blue background: > One two three > four five six > seven eight > nine ten. > > The padding will add extra background-coloured space to the start and > end of the sentence, shown below as "--": > --One two three > four five six > seven eight > nine ten.-- > > I would like to add such padding to every line. > --One two three-- > --four five six-- > --seven eight-- > --nine ten.-- > > It would be normal practice to simply add this padding to the > containing div element, but the blue background will not be shown > against each line. Is there a problem with simply moving the blue background to the containing div as well? Then the padding on the div would achieve the visual effect you want. ~TJ
Received on Tuesday, 19 January 2010 22:09:56 UTC