|
|
Phil Cook wrote:
> And lo on Tue, 06 Nov 2007 18:21:42 -0000, Orchid XP v7 <voi### [at] devnull>
> did spake, saying:
>
>> that only allows a fixed amount of nesting. I want to allow arbitrary
>> nesting.
>
> Which you didn't mention.
Oh alright then. ;-)
>> (This is basically for printing out expressions containing insane
>> numbers of brackets. I want to use borders to help untangle the mess
>> in some kind of visually-sane way...)
>
> count the number of brackets and times by two then set the padding that
> way so
>
> (A(B(C)D)E) is 6 then replace every ( with a padding=n-(i*2) i++
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <style>
> span {border: red 1px solid;}
> </style>
> <span style="padding:6px">A
> <span style="padding:4px">B
> <span style="padding:2px">C
> </span>
> D</span>
> E</span>
> </html>
>
> I'm sure you can get one of the languages you use to do something like
> that.
Well, that'll work... but surely there's some W3C compliant way of doing
this transparently without such low-level hacks?
(I still don't understand why having a large box inside doesn't cause
the containing box to enlarge itself...)
Post a reply to this message
|
|