Centering

D

dorayme

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?
 
B

BootNic

dorayme said:
news: (e-mail address removed)
[snip]
// 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);
}
[snip]

Should the lines:

if( window.addEventListener ) {
window.addEventListener('load',checkCenter,false);
window.addEventListener('resize',checkCenter,false);
} else if( document.addEventListener ) {
document.addEventListener('load',checkCenter,false);
document.addEventListener('resize',checkCenter,false);
} else if( window.attachEvent ) {
window.attachEvent("onload", checkCenter);
window.attachEvent("onresize", checkCenter);
}

be _replaced_ by your above?

I believe these are the same, the second one is just lacking the
comments.
 
D

dorayme

"BootNic said:
news: (e-mail address removed)
[snip]
// 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);
}
[snip]

Should the lines:

if( window.addEventListener ) {
window.addEventListener('load',checkCenter,false);
window.addEventListener('resize',checkCenter,false);
} else if( document.addEventListener ) {
document.addEventListener('load',checkCenter,false);
document.addEventListener('resize',checkCenter,false);
} else if( window.attachEvent ) {
window.attachEvent("onload", checkCenter);
window.attachEvent("onresize", checkCenter);
}

be _replaced_ by your above?

I believe these are the same, the second one is just lacking the
comments.

They differ in that in one you have checkCenter while in the
other it is floatCenter. But perhaps I am getting confused now?

Simpler question: Is bootnic5.js at http://tinyurl.com/33w8gm ok?
Have I got it right and taken your latest into account? As I say,
it works fine in Safari and iCab.
 
B

BootNic

dorayme said:
news: (e-mail address removed)
[snip]
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.


It sounds like maybe the onresize in not fireing. Only a guess I don't
iCab to check it out.

If you wish, I could just not use the onresize, just let the function
run on an iterval, and retun it if the width does not change.

Oh what the heck. Version that uses an interval.
http://home.earthlink.net/~bootnic/bstime.js
What I want to know is if http://tinyurl.com/33w8gm is ok in IE7
and 6 now?

All still seems fine on my system.

Opera showed up the a issue on http://members.optushome.com.au/droovies/thumbnails/thumbFilmStripGallery5.html
scroll the window too small and it seems to disapear.

Added a min with check within the script.
http://home.earthlink.net/~bootnic/bsIV.js
has been updated.

--
BootNic Tuesday, April 10, 2007 8:21 PM

Get your facts first, and then you can distort them as much as you
please.
*Mark Twain*
 
B

BootNic

dorayme said:
news: (e-mail address removed)
[snip]
I believe these are the same, the second one is just lacking the
comments.

They differ in that in one you have checkCenter while in the
other it is floatCenter. But perhaps I am getting confused now?


I suppose I have been looking at this script way too long, did not see
that either.
Simpler question: Is bootnic5.js at http://tinyurl.com/33w8gm ok?
Have I got it right and taken your latest into account? As I say,
it works fine in Safari and iCab.

Yes they are fine with the exception of the min with issue in my
other post.

Does the resize issue with iCab remain?

--
BootNic Tuesday, April 10, 2007 8:26 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*
 
D

dorayme

"BootNic said:
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.


It sounds like maybe the onresize in not fireing. Only a guess I don't
iCab to check it out.

If you wish, I could just not use the onresize, just let the function
run on an iterval, and retun it if the width does not change.

Oh what the heck. Version that uses an interval.
http://home.earthlink.net/~bootnic/bstime.js

This one "fixes" that resize issue but at the cost of the
centering no working at all either in iCab or Safari! I won't
post the example unless anyone really wants me to.
 
D

dorayme

dorayme said:
BootNic said:
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.


It sounds like maybe the onresize in not fireing. Only a guess I don't
iCab to check it out.

If you wish, I could just not use the onresize, just let the function
run on an iterval, and retun it if the width does not change.

Oh what the heck. Version that uses an interval.
http://home.earthlink.net/~bootnic/bstime.js

This one "fixes" that resize issue but at the cost of the
centering no working at all either in iCab or Safari! I won't
post the example unless anyone really wants me to.

STOP! My bad, I forgot to add a .js in my trial. It works fine
now in both Safari and iCab and yes, that resize problem is no
longer showing up in iCab. Well done.
 
B

BootNic

BootNic said:
news: [email protected] [snip]
Added a min with check within the script.
http://home.earthlink.net/~bootnic/bsIV.js
has been updated.

Time for me to walk away from this for a while, making way too many
mistakes.

The script was intended to use a timeout not an interval.

This is the last correction or update I am going to make to this script.
http://home.earthlink.net/~bootnic/bsV.js

The bstime.js I posted in one of my other messages is just fine...I think.

--
BootNic Tuesday, April 10, 2007 8:53 PM

If you can learn from hard knocks, you can also learn from soft
touches.
*Carolyn Kenmore*
 
D

dorayme

"BootNic said:
All still seems fine on my system.

Opera showed up the a issue on
http://members.optushome.com.au/droovies/thumbnails/thumbFilmStripGallery5.htm
l
scroll the window too small and it seems to disapear.

That's a nice one! I see it on my Mac Opera too.
Added a min with check within the script.
http://home.earthlink.net/~bootnic/bsIV.js
has been updated.

OK, now my latest with your latest is:

http://tinyurl.com/2j73ba

and no Opera or iCab issue and all seems fine on my Mac (till I
test or hear about Windows, I don't know about WinIE).
 
D

dorayme

"BootNic said:
news: [email protected] [snip]
Added a min with check within the script.
http://home.earthlink.net/~bootnic/bsIV.js
has been updated.

Time for me to walk away from this for a while, making way too many
mistakes.

The script was intended to use a timeout not an interval.

This is the last correction or update I am going to make to this script.
http://home.earthlink.net/~bootnic/bsV.js

The bstime.js I posted in one of my other messages is just fine...I think.

Well, no problem BootNic, you must know that I have been _plenty_
happy with your scripts for quite some time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top