Lisp vs. C++ (not off-topic)

Unknown W. Brackets unknown at simplemachines.org
Fri Oct 20 07:49:31 PDT 2006


Actually, they are portable... but what you're doing is technically 
incorrect.  I had thought it was intentional.

You set a width for the box, and so the standards-compliant browsers 
listen to you and do as you say.  You don't set overflow, so it's 
defaulted to visible.  Thus what you see in the screenshot.

Internet Explorer is completely ignoring the standards (what the CSS 
property "width" is supposed to do) and treating it as a minimum width.

Normally, you'd set min-width instead to get the effect that Internet 
Explorer is giving you... but IE does not support min-width.  Hence 
probably why Internet Explorer behaves this way.

A lot of people use something like this for that:

min-width: 600px;
width: expression("600px"); /* This line only understood by IE. */

However, Internet Explorer 7 (coming out _very_ soon, final already 
available for download) will comply with the standards (when the 
document has a proper DOCTYPE, which yours does) and thus the above will 
break it.

I would suggest that it wouldn't be too bad to simply have:

min-width: 600px;

Because, this will mean that Internet Explorer 6 and below will simply 
show the box at whatever width, including smaller than 600px... but 
every other browser will work as you wish.

-[Unknown]


> Chris Miller wrote:
>> On Fri, 20 Oct 2006 02:47:40 -0400, Walter Bright 
>> <newshound at digitalmars.com> wrote:
>>
>>> Lionello Lunesu wrote:
>>>> Of couse, I'd be honoured! :)
>>>
>>> Ok!
>>>
>>>> PS. I don't like the way the longer lines of code exceed the 
>>>> code-box. I had the same thing and fixed it using 'margin' instead 
>>>> of 'width' in the style sheet. Might work?
>>>
>>> I think it looks fine.
>>
>> Looks pretty bad to me, 
>> http://img148.imageshack.us/img148/5238/t4h8t4g3ev7.png
> 
> Yowsa! I guess that's the problem with style sheets. They aren't 
> portable. (It looks fine in Explorer, what are you using?)



More information about the Digitalmars-d mailing list