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

Unknown W. Brackets unknown at simplemachines.org
Fri Oct 20 22:41:42 PDT 2006


I'm afraid not.  Margin controls the amount of spacing outside the box, 
against other boxes or the outside edge of the browser.

Thus, if you want the box to be at least 600px wide on a 800px, 1024px, 
or 1600px screen (not even beginning to talk about un-maximized browser 
windows!)... you cannot use a fixed margin to achieve this.  Using a 
percentage wouldn't be too bad, but would cause their to be much 
scrollable space on the right.

Unless you mean something else, and I'm misunderstanding you?

You could, in theory, use some trickery to achieve the affect using 
margins or other properties and nesting many elements (or use a table), 
but it would likely result in brittle, unmaintainable HTML/CSS which 
does no one much good.

-[Unknown]


> "Unknown W. Brackets" <unknown at simplemachines.org> wrote in message 
> news:ehanlp$22jc$1 at digitaldaemon.com...
>> 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.
> 
> Wouldn't the same effect be achieved by setting "margin" instead of 
> "(min-)width"?
> 
> L. 
> 
> 



More information about the Digitalmars-d mailing list