Re: negative indent for paragraph



Els wrote:

> Xah Lee wrote:
>
>> is there a way to do negative indent for paragraphs, as in a dialogues?
>> (i.e. in Microsoft word, drag the top margin triangle to the left,
>> bottom to the right, then press tab after each person's name)
>>
>> here's a rather a hack after some 20 minutes diddling.
>
> I've never tried to do something like that, but it looks like a decent
> method to me. Have you tried it cross browser?
>
>> <style type="text/css">
>> p.dg {margin-top:5px; margin-bottom:5px;}
>> </style>
>>
>> <div style="background-color:yellow; padding:1ex;">
>> <div style="text-indent:-7ex; margin-left:7ex;">
>> <p class="dg">Ursula: Have we got a deal?</p>
>> <p class="dg">Ariel: If I become human, I'll never be with my father or
>> sisters again.</p>
>> <p class="dg">Ursula: But you'll have your man. Life's full of tough
>> choices, isn't? Oh — and there is one more thing. We haven't
>> discussed the subject of payment.</p>
>> <p class="dg">Ariel: But I don't have any —</p>
>> <p class="dg">Ursula: I'm not asking much. Just a token, really, a
>> trifle. What I want from you is... your voice.</p>
>> <p class="dg">Ariel: But without my voice, how can I —</p>
>> <p class="dg">Ursula: You'll have your looks! Your pretty face! And
>> don't underestimate the importance of body language! Ha!</p>
>> </div>
>> </div>
>
> There is no need for those classes on the <p> elements.
> Just transfer that inline style
*on the div*. that inline style on the containing div I meant :\
> to the style***, using a class, and
> refer to the p elements thus:
> div.dg{text-indent:-7ex; margin-left:7ex;}
> div.dg p{margin-top:5px; margin-bottom:5px;}
>
> A lot less code if you have many of those dialogues too.


--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Falco - Jeanny
.


Quantcast