[pmwiki-users] Maximum page-width in Katskin
Andrew Standfield
andy at scruffyco.com
Tue Aug 22 13:39:08 CDT 2006
The main problem, here, is that IE 5 and 6 don't really understand
body widths at all, let alone max-width, which it doesn't "do" on any
element.
The usual solution to this, is to make a "wrapper" div around the
entirety of the content. So, just below <body> you would have <div
id="wrapper"> and just above </body> you would end the div with </div>
Then you could set the div to a min-width like this:
#wrapper { max-width: 900px; }
Oh... but you're not done :) Microsoft hates web designers, so you'll
need to ask IE *very* nicely to not make the div any bigger than 900px.
Kat was very smart and used IE Conditionals rather than hacks to put
all of our special IE only CSS into their own little files. That will
make this a bit easier.
In the layout_ie.css file, you'll want to add this little chunk of code:
#wrapper { width:expression(document.body.clientWidth > 902? "900px":
"auto" ); }
Now... having said all of this, i haven't actually *tried* it myself,
as I've never had the need, but I strongly believe it will work. I
lifted the technique from http://www.cameronmoll.com/archives/
000892.html
It's also discussed here: http://www.svendtofte.com/code/
max_width_in_ie/
It seems stable enough. Just make sure you set the value after the >
to something different than the value in the quotes. IE will freeze
up otherwise :)
Andy Standfield
http://www.vertigo25.com/
http://www.ipodnirvana.com/
On Aug 22, 2006, at 10:16 AM, Hans wrote:
>> In both cases it has no effect whatsoever on the width of the site
>> in IE.
>> This may be because it is using several CSS files.
>>
>> How can I best put them in one css file?
>> What is the best way if you're using a skin to simplify the whole
>> css,
>> so that I cannot overlook values from other css file?
>
> Using several cvss files should not matter.
> I like using several, I keep one for layout, one for color setings,
> one for font settings etc.
>
> If you have the same css property assigned different values in
> different files, the latest loaded file will overturn a value from a
> previous loaded file.
>
> And if you use pub/css/local.css file, it will get loaded last
> normally, so any definitions there should stick.
>
> ~Hans
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list