[thelist] CSS/DIV help!

Jonathan Chard jonathan at familygenetix.com
Thu Feb 8 12:18:31 CST 2001


Hi Robin,

>The first problem is that in IE, you have to click twice on a screenshot to
>get the divs to display. I would prefer it if the divs would display
>immediately.

Blimey, selectTab() is complicated. Sure you don't want to rethink this
function...? Use divname.style.visibility = 'visible' or 'hidden' as
appropriate..? And is there a reason to set the z-index of each tab? By the
looks of it none of them are on top of each other, so you're not actually
achieving anything by moving them around. Anyhow, that's by the by.

selectTab() actually works, as long as you don't click on the first one
(Marvin Feldman). The reason for this is that your z-index of your three
panels is 6, 5, 4, and 2. In your loop, the first time selectTab() is called
your check as to when to move your panel to the front includes the condition
(z != numDiv), which, for that tab is false (z is 4, numDiv is 4) so the
z-index doesn't get set correctly. The else condition is then invoked which
sets the z index of that panel to 3, so that the next time it's called, it
gets shown.

So, the fix is to to change the z-index in your css of p1panel2 to '3' and
it should all work. But that made my head hurt working that out, there must
be an easier way. (I subscribe to the KISS school of programming)(Keep It
Simple, Stupid)

>The second problem is that my DreamWeaver 4 canned browser check script is
>redirecting NN 4.08 and later (including 6.0) to my table layout version of
>the page. What do I need to do to make 6.0 stay at the CSS/DIV version of
>this page?

Cor blimey this is even worse! I don't know how anyone ever uses these
DreamWeaver scripts, they're compressed to such an extent that if they don't
do exactly as you want, you're knackered because they're utterly
unreadable..
Anyhow, try changing the line
if (version >= NSvers)

to

if (version >= NSvers && version < 5)

<---(Everyone... NS6 does report it's version number as 5 doesn't it? I
can't remember. Can't even run the damn thing on my machine) ---->

I think that'll work.

Also - does anyone know if getElementById() supported by IE4? I don't think
it is. But the checkBrowser function will allow IE4 users into this page,
which will then generate a JS error when someone clicks on your tabs. Not
what you want when you're showing off your work to potential customers.....
So, if it's IE4 you'd better use document.all['panelname'] to get to the
panels...

Hope this sort of helps a bit.

Jon Chard.





More information about the thelist mailing list