Re: [CSS3 Text] request: line-padding

No, the gaps between the lines, provided by the line-height, would not
display.  Also the line lengths would not be preserved.
I'd just get a blue box, which is not what I'm after.
Try the demo code, and think of strips of dymo :)

K

2010/1/19 Tab Atkins Jr. <jackalmage@gmail.com>:
> 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
>



-- 
Kenneth
http://kenneth.kufluk.com
kenneth@kufluk.com

Received on Tuesday, 19 January 2010 22:41:02 UTC