POV-Ray : Newsgroups : povray.off-topic : Small CSS question Server Time
15 Oct 2026 03:41:04 EDT (-0400)
  Small CSS question (Message 1 to 38 of 38)  
From: Invisible
Subject: Small CSS question
Date: 6 Nov 2007 10:59:11
Message: <47308f4f$1@news.povray.org>
I have the following HTML:

   <span>A<span>B<span>C</span>D</span>E</span>

I've set up some CSS to put borders round span elements. It's supposed 
to display as follows:

   +---------+
   | +-----+ |
   | | +-+ | |
   |A|B|C|D|E|
   | | +-+ | |
   | +-----+ |
   +---------+

However, no matter what I do, it actually renders like this:

   +-+-+-+-+-+-+
   |A|B|C|D|E|F|
   +-+-+-+-+-+-+

Any idea how I fix this?


Post a reply to this message

From: Warp
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:24:31
Message: <4730953e@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Any idea how I fix this?

  'padding' is probably the keyword you are looking for.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:37:26
Message: <47309846$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> Any idea how I fix this?
> 
>   'padding' is probably the keyword you are looking for.

Yeah, I was expecting some combination of padding and/or margin to do 
it. But I can't seem to get that to work...


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:40:24
Message: <473098f8@news.povray.org>
Invisible escribió:
> I have the following HTML:
> 
>   <span>A<span>B<span>C</span>D</span>E</span>
> 
> I've set up some CSS to put borders round span elements. It's supposed 
> to display as follows:
> 
>   +---------+
>   | +-----+ |
>   | | +-+ | |
>   |A|B|C|D|E|
>   | | +-+ | |
>   | +-----+ |
>   +---------+
> 
> However, no matter what I do, it actually renders like this:
> 
>   +-+-+-+-+-+-+
>   |A|B|C|D|E|F|
>   +-+-+-+-+-+-+
> 
> Any idea how I fix this?

I tried giving it both padding and margin, but didn't get what you 
wanted. However, display:block did the trick. It makes the span behave 
just like a div (and a div with display:inline would be identical to a 
span). You need to give it explicit width though; the default is 100% of 
the container block (the whole page in my test).


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:42:05
Message: <4730995d$1@news.povray.org>
Nicolas Alvarez escribió:
> I tried giving it both padding and margin, but didn't get what you 
> wanted. However, display:block did the trick. It makes the span behave 
> just like a div (and a div with display:inline would be identical to a 
> span). You need to give it explicit width though; the default is 100% of 
> the container block (the whole page in my test).

Scratch that; it doesn't match what you want (but gets close enough). It 
doesn't get the B and D on the *sides* of the C block.

*tweaks more*


Post a reply to this message

From: Invisible
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:47:23
Message: <47309a9b$1@news.povray.org>
Nicolas Alvarez wrote:
> Nicolas Alvarez escribió:
>> I tried giving it both padding and margin, but didn't get what you 
>> wanted. However, display:block did the trick. It makes the span behave 
>> just like a div (and a div with display:inline would be identical to a 
>> span). You need to give it explicit width though; the default is 100% 
>> of the container block (the whole page in my test).
> 
> Scratch that; it doesn't match what you want (but gets close enough). It 
> doesn't get the B and D on the *sides* of the C block.
> 
> *tweaks more*

Yeah, I already discovered that one myself. ;-)

There's a couple of other settings that do more or less the same thing 
too. (display:table, etc.) But none does what I actually want. :-(


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:49:40
Message: <47309b24$1@news.povray.org>
Invisible escribió:
> There's a couple of other settings that do more or less the same thing 
> too. (display:table, etc.) But none does what I actually want. :-(

And even if they did what you want, you may like to know display:table, 
table-cell, table-row, etc; aren't supported by Microshaft Internet 
Exploder.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:53:15
Message: <47309bfb@news.povray.org>
Nicolas Alvarez escribió:
> *tweaks more*

Doesn't seem easy. You would need like three columns on each span: the 
letter, the inner span, and the other letter.

I got close enough with floats:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
     <style type="text/css">
     div.block {
       border: red 1px solid;
       padding: 5px;
       margin: 5px;
     }
     div {
       float: left;
     }
     </style>
   </head>
   <body>
     <div class="block">
       <div>A</div>
       <div class="block">
         <div>B</div>
         <div class="block">
           <div>C</div>
         </div>
         <div>D</div>
       </div>
       <div>E</div>
     </div>
   </body>
</html>

But I couldn't manage to get the letters vertically centered.


Post a reply to this message

From: Invisible
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:58:45
Message: <47309d45$1@news.povray.org>
Nicolas Alvarez wrote:
> Invisible escribió:
>> There's a couple of other settings that do more or less the same thing 
>> too. (display:table, etc.) But none does what I actually want. :-(
> 
> And even if they did what you want, you may like to know display:table, 
> table-cell, table-row, etc; aren't supported by Microshaft Internet 
> Exploder.

...and I care because? ;-) ;-)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 12:05:38
Message: <47309ee2$1@news.povray.org>
Invisible escribió:
> Nicolas Alvarez wrote:
>> Invisible escribió:
>>> There's a couple of other settings that do more or less the same 
>>> thing too. (display:table, etc.) But none does what I actually want. :-(
>>
>> And even if they did what you want, you may like to know 
>> display:table, table-cell, table-row, etc; aren't supported by 
>> Microshaft Internet Exploder.
> 
> ...and I care because? ;-) ;-)

I dunno, some weird people care. And people who make pages that 
unfortunately *should* work for everybody. For example, an e-commerce 
page that doesn't work on IE means less people wasting money^W^W buying 
there.

But even then, it's always fun to have at least a feature or two that 
require a correctly-working browser :) "If you have IE, you can still 
buy but the site will look ugly; blame Microsoft for that."


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 6 Nov 2007 12:10:30
Message: <op.t1drbcl8c3xi7v@news.povray.org>
And lo on Tue, 06 Nov 2007 15:59:06 -0000, Invisible <voi### [at] devnull> did
  

spake, saying:

> I have the following HTML:
>
>    <span>A<span>B<span>C</span>D</span>E</span>
>
> I've set up some CSS to put borders round span elements. It's supposed
  

> to display as follows:
>
>    +---------+
>    | +-----+ |
>    | | +-+ | |
>    |A|B|C|D|E|
>    | | +-+ | |
>    | +-----+ |
>    +---------+
>
> However, no matter what I do, it actually renders like this:
>
>    +-+-+-+-+-+-+
>    |A|B|C|D|E|F|
>    +-+-+-+-+-+-+
>
> Any idea how I fix this?

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>

-- 

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

From: Phil Cook
Subject: Re: Small CSS question
Date: 6 Nov 2007 12:24:43
Message: <op.t1dry0xyc3xi7v@news.povray.org>
And lo on Tue, 06 Nov 2007 15:59:06 -0000, Invisible <voi### [at] devnull> did

spake, saying:

> I have the following HTML:
>
>    <span>A<span>B<span>C</span>D</span>E</span>
>
> I've set up some CSS to put borders round span elements. It's supposed
  

> to display as follows:
>
>    +---------+
>    | +-----+ |
>    | | +-+ | |
>    |A|B|C|D|E|
>    | | +-+ | |
>    | +-----+ |
>    +---------+
>
> However, no matter what I do, it actually renders like this:
>
>    +-+-+-+-+-+-+
>    |A|B|C|D|E|F|
>    +-+-+-+-+-+-+
>
> Any idea how I fix this?

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>

-- 

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

From: Orchid XP v7
Subject: Re: Small CSS question
Date: 6 Nov 2007 13:21:39
Message: <4730b0b3$1@news.povray.org>
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, that only allows a fixed amount 
of nesting. I want to allow arbitrary nesting.

(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...)


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Small CSS question
Date: 6 Nov 2007 22:26:52
Message: <4731307c@news.povray.org>
Try making it using the table tools in google docs. THEN look at the HTML
they come up with.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 6 Nov 2007 22:56:34
Message: <47313772$1@news.povray.org>
Greg M. Johnson escribió:
> Try making it using the table tools in google docs. THEN look at the HTML
> they come up with.

Tables would be overkill and *wrong* for this.
http://www.hotdesign.com/seybold/


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 7 Nov 2007 04:06:29
Message: <op.t1ezimvmc3xi7v@news.povray.org>
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

From: Invisible
Subject: Re: Small CSS question
Date: 7 Nov 2007 04:36:18
Message: <47318712$1@news.povray.org>
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

From: Phil Cook
Subject: Re: Small CSS question
Date: 7 Nov 2007 05:22:24
Message: <op.t1e200osc3xi7v@news.povray.org>
And lo on Wed, 07 Nov 2007 09:36:17 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

> Phil Cook wrote:
>> And lo on Tue, 06 Nov 2007 18:21:42 -0000, Orchid XP v7 <voi### [at] devnull>  
>> did spake, saying:
>>
<snip>

>>  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?

This is a W3C compliant way - HTML+CSS, what's not compliant about it? The  
only thing you can moan about is the use of style in a strict.

> (I still don't understand why having a large box inside doesn't cause  
> the containing box to enlarge itself...)

It does if you use a block rather then an inline element.

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 7 Nov 2007 07:34:51
Message: <4731b0eb$1@news.povray.org>
Phil Cook wrote:
> And lo on Wed, 07 Nov 2007 09:36:17 -0000, Invisible <voi### [at] devnull> did 
> spake, saying:
> 
>> Well, that'll work... but surely there's some W3C compliant way of 
>> doing this transparently without such low-level hacks?
> 
> This is a W3C compliant way - HTML+CSS, what's not compliant about it? 
> The only thing you can moan about is the use of style in a strict.

It just seems a pitty to have to litter the code with style information 
that should be in a seperate stylesheet, that's all.

What I *could* do is this:

   style {padding: 1em;}
   style style {padding: 2em;}
   style style style {padding: 3em;}
   etc.

But that still seems a crying shame...

>> (I still don't understand why having a large box inside doesn't cause 
>> the containing box to enlarge itself...)
> 
> It does if you use a block rather then an inline element.

But then it adds unwanted linebreaks.


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 7 Nov 2007 09:16:00
Message: <op.t1fds5gmc3xi7v@news.povray.org>
And lo on Wed, 07 Nov 2007 12:34:50 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

> Phil Cook wrote:
>> And lo on Wed, 07 Nov 2007 09:36:17 -0000, Invisible <voi### [at] devnull>  
>> did spake, saying:
>>
>>> Well, that'll work... but surely there's some W3C compliant way of  
>>> doing this transparently without such low-level hacks?
>>  This is a W3C compliant way - HTML+CSS, what's not compliant about it?  
>> The only thing you can moan about is the use of style in a strict.
>
> It just seems a pitty to have to litter the code with style information  
> that should be in a seperate stylesheet, that's all.
>
> What I *could* do is this:
>
>    style {padding: 1em;}
>    style style {padding: 2em;}
>    style style style {padding: 3em;}
>    etc.
>
> But that still seems a crying shame...

Wrong way round. You could have a fixed css file containing the following

html {margin:20px;}
span {border: red 1px solid;}
span {padding:20px;}
span span {padding:18px;}
span span span {padding:16px;}
...

Assuming ten levels max and you would at least have a fixed height for the  
equation you're displaying

>>> (I still don't understand why having a large box inside doesn't cause  
>>> the containing box to enlarge itself...)
>>  It does if you use a block rather then an inline element.
>
> But then it adds unwanted linebreaks.

Yep life's a bitch.

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 7 Nov 2007 10:53:58
Message: <4731df96@news.povray.org>
Phil Cook wrote:
> And lo on Wed, 07 Nov 2007 12:34:50 -0000, Invisible <voi### [at] devnull> did 
> spake, saying:
> 
>> What I *could* do is this:
>>
>>    style {padding: 1em;}
>>    style style {padding: 2em;}
>>    style style style {padding: 3em;}
>>    etc.
>>
>> But that still seems a crying shame...
> 
> Wrong way round. 

Gah. o_O


Post a reply to this message

From: Joel Yliluoma
Subject: Re: Small CSS question
Date: 9 Nov 2007 03:16:44
Message: <slrnfj85rc.j3c.bisqwit@bisqwit.iki.fi>
On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
> (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...)

Try MathML. It helps greatly at least if your formula contains divisions.

 <math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
   <mn>log</mn> 
   <mo>(</mo>
     <mfrac>
     <mrow>
       <mn>sqrt</mn>
       <mo>(</mo>
       <mn>5</mn>
       <mo>)</mo> 
     </mrow>
     <mrow>10</mrow>
     </mfrac>
   <mo>)</mo>
  </mrow>
 </math>

MathML can be embedded in XHTML, but you need to pass
the right Content-type header (xhtml+xml).

-- 
Joel Yliluoma - http://bisqwit.iki.fi/
: comprehension = 1 / (2 ^ precision)


Post a reply to this message

From: Invisible
Subject: Re: Small CSS question
Date: 9 Nov 2007 04:54:58
Message: <47342e72$1@news.povray.org>
Joel Yliluoma wrote:
> On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
>> (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...)
> 
> Try MathML. It helps greatly at least if your formula contains divisions.
> 
>  <math xmlns="http://www.w3.org/1998/Math/MathML">
>   <mrow>
>    <mn>log</mn> 
>    <mo>(</mo>
>      <mfrac>
>      <mrow>
>        <mn>sqrt</mn>
>        <mo>(</mo>
>        <mn>5</mn>
>        <mo>)</mo> 
>      </mrow>
>      <mrow>10</mrow>
>      </mfrac>
>    <mo>)</mo>
>   </mrow>
>  </math>
> 
> MathML can be embedded in XHTML, but you need to pass
> the right Content-type header (xhtml+xml).

OK, let's see the MathML for the following expression:

 
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))

Care to tell me where one subexpression ends and the next one begins? ;-)


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 9 Nov 2007 09:20:19
Message: <op.t1i3d1rsc3xi7v@news.povray.org>
And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull> did
  

spake, saying:

> Joel Yliluoma wrote:
>> On Tue, 06 Nov 2007 18:21:42 +0000, Orchid XP v7 wrote:
>>> (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...)
>>  Try MathML. It helps greatly at least if your formula contains  

>> divisions.
>>   <math xmlns="http://www.w3.org/1998/Math/MathML">
>>   <mrow>
>>    <mn>log</mn>    <mo>(</mo>
>>      <mfrac>
>>      <mrow>
>>        <mn>sqrt</mn>
>>        <mo>(</mo>
>>        <mn>5</mn>
>>        <mo>)</mo>      </mrow>
>>      <mrow>10</mrow>
>>      </mfrac>
>>    <mo>)</mo>
>>   </mrow>
>>  </math>
>>  MathML can be embedded in XHTML, but you need to pass
>> the right Content-type header (xhtml+xml).
>
> OK, let's see the MathML for the following expression:
>
>   

> S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(
KS)K)(S(S(KS)K)(S(S(KS)K)I))))
>
> Care to tell me where one subexpression ends and the next one begins? 
;-)

Just for fun with spans

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<style>
html {margin:20px;}
div {height:40px;}
span {padding:20px; border: red 1px solid;}
span span {padding:18px; border: orange 1px solid;}
span span span {padding:16px; border: yellow 1px solid;}
span span span span {padding:14px; border: green 1px solid;}
span span span span span {padding:12px; border: blue 1px solid;}
span span span span span span {padding:10px; border: red 1px dotted;}
span span span span span span span {padding:8px; border: orange 1px  

dotted;}
span span span span span span span span {padding:6px; border: yellow 1px
  

dotted;}
span span span span span span span span span {padding:4px; border: green
  

1px dotted;}
span span span span span span span span span span {padding:2px; border: 
 

blue 1px dotted;}
span span span span span span span span span span span {padding:0px;  

border: black 1px dotted;}
</style>
<div>S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S
(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))</div>
<div>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</span
>I</span><span>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</sp
an>K</span><span>S<span>S<span>KS</span>K</span>I</span></span></span><s
pan>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</span>
<span>S<span>S<span>KS</span>K</span><span>S<span>S<span>KS</span>K</spa
n>I</span></span></span></span></div>
</html>

that's using a simple find replace on () for <span></span>
-- 

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

From: Invisible
Subject: Re: Small CSS question
Date: 9 Nov 2007 09:40:17
Message: <47347151$1@news.povray.org>
Phil Cook wrote:
> And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull> did 
> spake, saying:
> 
>> OK, let's see the MathML for the following expression:
>>
>> 
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))

>>
>>
>> Care to tell me where one subexpression ends and the next one begins? ;-)
> 
> Just for fun with spans

Looks good! (Although possibly the spacing is a little *too* generous.) 
Certainly a lot easier to find subexpressions than in the raw text 
above. Just a pitty it takes so many miles of CSS...


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 9 Nov 2007 09:46:02
Message: <op.t1i4jqugc3xi7v@news.povray.org>
And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

> Phil Cook wrote:
>> And lo on Fri, 09 Nov 2007 09:54:59 -0000, Invisible <voi### [at] devnull>  
>> did spake, saying:
>>
>>> OK, let's see the MathML for the following expression:
>>>
>>> 
S(S(KS)K)(S(S(KS)K)I)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I)))(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)(S(S(KS)K)I))))
 
>>> Care to tell me where one subexpression ends and the next one begins?  
>>> ;-)
>>  Just for fun with spans
>
> Looks good! (Although possibly the spacing is a little *too* generous.)

Well it's allowing for 11 levels with enough of a gap so that lines don't  
blend, but it's adjustable.

> Certainly a lot easier to find subexpressions than in the raw text  
> above. Just a pitty it takes so many miles of CSS...

Well the CSS is fixed so just dump it into a separate file and all you'll  
have is the spans

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 9 Nov 2007 10:03:57
Message: <473476dd$1@news.povray.org>
Phil Cook wrote:
> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull> did 
> spake, saying:
> 
>> Certainly a lot easier to find subexpressions than in the raw text 
>> above. Just a pitty it takes so many miles of CSS...
> 
> Well the CSS is fixed so just dump it into a separate file and all 
> you'll have is the spans

True.

I'm wondering if I could do something weird with inheritance and 
percentage units...


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Small CSS question
Date: 9 Nov 2007 10:09:04
Message: <47347810$1@news.povray.org>
Invisible escribió:
> Phil Cook wrote:
>> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull> 
>> did spake, saying:
>>
>>> Certainly a lot easier to find subexpressions than in the raw text 
>>> above. Just a pitty it takes so many miles of CSS...
>>
>> Well the CSS is fixed so just dump it into a separate file and all 
>> you'll have is the spans
> 
> True.
> 
> I'm wondering if I could do something weird with inheritance and 
> percentage units...

All you need is server-side scripting. Count the parentheses levels and 
generate the CSS with that many levels. But a pure CSS method would be nice.

Still, you should really use MathML. That's what it's made for...


Post a reply to this message

From: Invisible
Subject: Re: Small CSS question
Date: 9 Nov 2007 10:20:43
Message: <47347acb@news.povray.org>
Nicolas Alvarez wrote:

> All you need is server-side scripting. Count the parentheses levels and 
> generate the CSS with that many levels. But a pure CSS method would be 
> nice.

Nah; just generate a file with 20 levels of nesting. If there's more 
than that, you won't be able to disentangle it visually anyway. (And 
it's not like the program will crash; it'll just show less clean output.)

> Still, you should really use MathML. That's what it's made for...

What, drawing pretty lines around bits of text?


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 9 Nov 2007 10:59:18
Message: <op.t1i7untmc3xi7v@news.povray.org>
And lo on Fri, 09 Nov 2007 15:08:59 -0000, Nicolas Alvarez  
<nic### [at] gmailisthebestcom> did spake, saying:

> Invisible escribió:
>> Phil Cook wrote:
>>> And lo on Fri, 09 Nov 2007 14:40:17 -0000, Invisible <voi### [at] devnull>  
>>> did spake, saying:
>>>
>>>> Certainly a lot easier to find subexpressions than in the raw text  
>>>> above. Just a pitty it takes so many miles of CSS...
>>>
>>> Well the CSS is fixed so just dump it into a separate file and all  
>>> you'll have is the spans
>>  True.
>>  I'm wondering if I could do something weird with inheritance and  
>> percentage units...
>
> All you need is server-side scripting. Count the parentheses levels and  
> generate the CSS with that many levels.

Which was my first suggestion :-)

> But a pure CSS method would be nice.
>
> Still, you should really use MathML. That's what it's made for...

But little use unless you can serve it as application/xhtm+xml whereas  
html is always served as text/html without the need for a dedicated server  
component.

-- 
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

From: Darren New
Subject: Re: Small CSS question
Date: 11 Nov 2007 17:46:33
Message: <47378649$1@news.povray.org>
Phil Cook wrote:
> span span span span {padding:14px; border: green 1px solid;}

Wonderful span! Glorious span! (span span span!)

Shut up! Shut up!

Could I have S(S(KS)K)(S(S(KS)K)I) without so much span in it?

EWWWW!

> span span span span span {padding:12px; border: blue 1px solid;}
> span span span span span span {padding:10px; border: red 1px dotted;}

Seriously, I didn't know you could do that with CSS. Cool.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 12 Nov 2007 04:09:20
Message: <op.t1n81f14c3xi7v@news.povray.org>
And lo on Sun, 11 Nov 2007 22:46:33 -0000, Darren New <dne### [at] sanrrcom>  
did spake, saying:

> Phil Cook wrote:
>> span span span span {padding:14px; border: green 1px solid;}
>
> Wonderful span! Glorious span! (span span span!)
>
> Shut up! Shut up!
>
> Could I have S(S(KS)K)(S(S(KS)K)I) without so much span in it?
>
> EWWWW!

well you could replace all the span with inline div :-)

>> span span span span span {padding:12px; border: blue 1px solid;}
>> span span span span span span {padding:10px; border: red 1px dotted;}
>
> Seriously, I didn't know you could do that with CSS. Cool.

Heh I think it should be called MySpace code

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 12 Nov 2007 04:33:18
Message: <47381dde@news.povray.org>
Phil Cook wrote:

> Heh I think it should be called MySpace code

That's not even funny. Seriously. Have you *seen* MySpace? >_<


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 12 Nov 2007 05:41:17
Message: <op.t1odapdec3xi7v@news.povray.org>
And lo on Mon, 12 Nov 2007 09:33:17 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

> Phil Cook wrote:
>
>> Heh I think it should be called MySpace code
>
> That's not even funny. Seriously. Have you *seen* MySpace? >_<

Oh yeah. I wasn't suggesting the term as a compliment.

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 12 Nov 2007 08:05:37
Message: <47384fa1$1@news.povray.org>
>>> Heh I think it should be called MySpace code
>>
>> That's not even funny. Seriously. Have you *seen* MySpace? >_<
> 
> Oh yeah. I wasn't suggesting the term as a compliment.

The only thing worse than the HTML on MySpace is the crud the actual 
users add to it themselves.

(I especially liked the red writing on a pink background with a hail of 
red hearts constantly raining down in the foreground...)


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 12 Nov 2007 12:11:08
Message: <op.t1ovcgkec3xi7v@news.povray.org>
And lo on Mon, 12 Nov 2007 13:05:36 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

>>>> Heh I think it should be called MySpace code
>>>
>>> That's not even funny. Seriously. Have you *seen* MySpace? >_<
>>  Oh yeah. I wasn't suggesting the term as a compliment.
>
> The only thing worse than the HTML on MySpace is the crud the actual  
> users add to it themselves.
>
> (I especially liked the red writing on a pink background with a hail of  
> red hearts constantly raining down in the foreground...)

I like the way MySapce<sic> don't enforce picture sizes then auto-expand  
column widths.

-- 
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

From: Invisible
Subject: Re: Small CSS question
Date: 13 Nov 2007 04:25:54
Message: <47396da2$1@news.povray.org>
Also... is there a reason why every MySpace profile randomly plays 6 
different MP3 files at you simultaneously as soon as you visit it?


Post a reply to this message

From: Phil Cook
Subject: Re: Small CSS question
Date: 13 Nov 2007 05:10:18
Message: <op.t1p6inl0c3xi7v@news.povray.org>
And lo on Tue, 13 Nov 2007 09:25:53 -0000, Invisible <voi### [at] devnull> did  
spake, saying:

> Also... is there a reason why every MySpace profile randomly plays 6  
> different MP3 files at you simultaneously as soon as you visit it?

Yes, but the reason is only revealed once you've been illuminated into the  
9th degree.

-- 
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.