|
Posted by BootNic on 04/10/07 18:23
> Ben C <spamspam@spam.eggs> wrote:
> news: slrnf1mug1.tr2.spamspam@bowser.marioworld
> On 2007-04-09, dorayme <doraymeRidThis@optusnet.com.au> wrote:
>> In article <slrnf1khn0.oc.spamspam@bowser.marioworld>,
>> Ben C <spamspam@spam.eggs> wrote:
>>
>>> I haven't been following how you're doing the centering, so I'm not
>>> sure if this is what you're talking about, but an auto-width float
>>> that contains a lot of smaller floats (enough that they need to flow
>>> underneath each other) should occupy the whole available width.
>>
>> Are you seeing any visual problem in any of your browsers (I know
>> you have no IE) at
>>
>> http://tinyurl.com/2a434t
>>
>> Do the mass of the little boxes center ok? Does anything become a
>> problem when you resize or do anything to your browser windows on
>> any of your browsers?
>
> It works fine on Konqueror, Opera and Firefox. But 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);
}
Tuck this away in a code snip so next time I make this mistake I may
be able to recognize it.
--
BootNic Tuesday, April 10, 2007 2:22 PM
Happiness for the average person may be said to flow largely from
common sense - adapting one-self to circumstances - and a sense of
humor.
*Beatrice Lillie (1898-1989) English comedienne*
[Back to original message]
|