|
Posted by dorayme on 04/10/07 22:36
In article
<doraymeRidThis-7FE7A2.08172111042007@news-vip.optusnet.com.au>,
dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article
> <tCQSh.20152$PL.17568@newsread4.news.pas.earthlink.net>,
> "BootNic" <bootnic@bounce.earthlink.net> wrote:
>
> > > Ben C <spamspam@spam.eggs> wrote:
>
> > >> http://tinyurl.com/2a434t
> > > I see the JS checks
> > > for window.addEventListener, but not for document.addEventListener.
> > > I'm not sure whether it should or not.
> >
> > That is not correct, that is the kind of mistake I make for trying to
> > type from a memory and auto select.
> >
> > It should have been like Jonathan N. Littles snip and needs to be
> > corrected.
> >
> > // attach events
> > if( window.addEventListener ) {
> > window.addEventListener('load',floatCenter,false); //legacy
> > window.addEventListener('resize',floatCenter,false);
> > } else if( document.addEventListener ) {
> > document.addEventListener('load',floatCenter,false); //proper
> > document.addEventListener('resize',floatCenter,false);
> > } else if( window.attachEvent ) {
> > window.attachEvent("onload", floatCenter); //IE only
> > window.attachEvent("onresize", floatCenter);
> > }
I have had a go at what seems to me the replacement looking at
the conditionals and have the latest at:
http://tinyurl.com/33w8gm
Is this right? It works fine in Safari and iCab.
Just btw (or not btw?), iCab is ok up to a point, but it has
always exhibited the following odd behaviour: Centering is fine
on load or refresh. But if one simply alters the window size
down, it is as if the design has a min-width of "as big as it was
before the window resize"! The scrollbars come up etc. All shakes
down fine on refresh. No big deal of course.
What I want to know is if http://tinyurl.com/33w8gm is ok in IE7
and 6 now?
--
dorayme
Navigation:
[Reply to this message]
|