POV-Ray : Newsgroups : povray.off-topic : Small CSS question Server Time
11 Oct 2024 15:19:50 EDT (-0400)
  Small CSS question (Message 9 to 18 of 38)  
<<< Previous 8 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Re: Small CSS question
Date: 6 Nov 2007 11:58:45
Message: <47309d45$1@news.povray.org>
Nicolas Alvarez wrote:

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

> Nicolas Alvarez wrote:

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

> 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

<<< Previous 8 Messages Goto Latest 10 Messages Next 10 Messages >>>

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