>
Some texst
http://www.svendtofte.com/code/max_width_in_ie/
At the bottom of the page are links to pages that simulate min-width and
max-width for IE and implement the real thing for other browsers.
Seems to work fine although it does require javascript to be enabled.
--
Cheers
Richard.
Re: min-width
am 25.12.2004 12:25:01 von Dylan Parry
Dylan Parry wrote:
> A quick look tells me something is wrong with that... try:
Ignore me. I was typing rubbish ;)
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
Re: min-width
am 25.12.2004 12:25:47 von Erik Ginnerskov
rf wrote:
>> In FireFox this code vill work perfectly:
>>
>>
Some texst
>
> http://www.svendtofte.com/code/max_width_in_ie/
That link gave me the answer to how I make IE understand max-height. It even
works in the fossil version 5.0. Thank you very much. ;)
But it doesn' work as expected with min-width.
div {
min-width:300px;
width:expression(document.body.clientWidth < 300? "300px": "auto" );
}
The script sets the box to 100% of the viewport, if the viewport is more
than the desired 300px. ;(
--
Yours
Erik Ginnerskov
http://hjemmesideskolen.dk - http://html-faq.dk
http://ginnerskov.frac.dk
Re: min-width
am 25.12.2004 12:31:52 von Dylan Parry
Erik Ginnerskov wrote:
> div {
> min-width:300px;
> width:expression(document.body.clientWidth < 300? "300px": "auto" );
> }
A quick look tells me something is wrong with that... try:
div {
min-width:300px;
width:expression(document.body.clientWidth < 300? "auto": "300px" );
}
I've not seen this solution before, but it seems like it will work for
most folk with IE as long as scripting is turned on... I suppose that
for the few that turn scripting off that it won't make too much
difference in terms of design anyway?
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
Re: min-width
am 25.12.2004 12:41:07 von Dylan Parry
Erik Ginnerskov wrote:
> But it doesn' work as expected with min-width.
Now that I have screwed my brain back into my head, taking a look at the
sample page on that site,
http://www.svendtofte.com/code/max_width_in_ie/pixels_minwid th.html, the
code /seems/ to work in IE6. Do you have a sample uploaded where it
*isn't* working properly?
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
Re: min-width
am 25.12.2004 14:30:52 von Erik Ginnerskov
Dylan Parry wrote:
>> But it doesn' work as expected with min-width.
>
> the code /seems/ to work in IE6. Do you have a sample uploaded where
> it *isn't* working properly?
I have just made a sample page in english, explaining what I want it to do
and showing the code used:
http://www.hjemmesideskolen.dk/html/testsider/min-width.asp
View the page in Mozilla or FireFox and try decreasing and increasing the
width of the browser window, before trying with Internet Explorer.
In Mozilla and FireFox the little boxes with light blue rim behaves exactly
as I want them to. In IE the upper box expands to the full width of the
viewport, no matter what width of viewport.
--
Yours
Erik Ginnerskov
http://hjemmesideskolen.dk - http://html-faq.dk
http://ginnerskov.frac.dk
Re: min-width
am 25.12.2004 14:56:05 von Dylan Parry
Erik Ginnerskov wrote:
> http://www.hjemmesideskolen.dk/html/testsider/min-width.asp
After stripping it down to minimum code, I found that the only way I
could get it to work was by removing the doctype so that IE reverted to
quirks mode. I'm not sure how to make it work in standards mode though,
as I don't have all that much experience with IE specific script/css.
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
Re: min-width
am 25.12.2004 15:26:52 von Erik Ginnerskov
Dylan Parry wrote:
>> http://www.hjemmesideskolen.dk/html/testsider/min-width.asp
>
> After stripping it down to minimum code, I found that the only way I
> could get it to work was by removing the doctype so that IE reverted
> to quirks mode.
The only effect I could see was that the lower box no longer was centered in
the viewport.
--
Yours
Erik Ginnerskov
http://hjemmesideskolen.dk - http://html-faq.dk
http://ginnerskov.frac.dk