|
|
And lo on Tue, 06 Nov 2007 18:21:42 -0000, Orchid XP v7 <voi### [at] devnull>
did spake, saying:
> Phil Cook wrote:
>
>> What's wrong with this?
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/html4/strict.dtd">
>> <html>
>> <style>
>> span.outer {border: red 1px solid; padding: 20px;}
>> span.inner {border: red 1px solid; padding: 10px;}
>> span.centre {border: red 1px solid; padding: 0px;}
>> </style>
>> <span class="outer">A<span class="inner">B<span
>> class="centre">C</span>D</span>E</span>
>> </html>
>
> Apart from there being an echo in here,
I saw spans used that you said produced a fixed height block, I saw divs
used with and without floats; I didn't see this suggestion.
> that only allows a fixed amount of nesting. I want to allow arbitrary
> nesting.
Which you didn't mention.
> (This is basically for printing out expressions containing insane
> numbers of brackets. I want to use borders to help untangle the mess i
n
> 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.
--
Phil Cook
--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com
Post a reply to this message
|
|