peculiar dom model for nested UL elements

H

Henrik Bechmann

All,

I'm trying to spoof Google's vertical tabs in a vertical menu
structured with nested UL/LI elements.

To do this, I need to find out where the anchor in the LI is, and then
create an absolute positioned div to bridge the space between the menu
and the content page.

This works with one level of LI's. However, with more than one, the
nested elements have offsetHeight and clientTop (among others) that
are set to 0 (zero). (And even more peculiar - using the FF debugger,
the embedded stacked anchor strings have apparently been converted to
a single string with embedded line breaks).

Anyway, I don't get it.

The question: how do I get positioning information for nested UL/LI
elements (in both FF and IE6&7).

Thanks!

- Henrik
 
R

RobG

All,

I'm trying to spoof Google's vertical tabs in a vertical menu
structured with nested UL/LI elements.

I have no idea what you mean by that. Do you have a link?

To do this, I need to find out where the anchor in the LI is, and then
create an absolute positioned div to bridge the space between the menu
and the content page.

That may make sense if I knew what you were trying to achieve, but I
don't so it doesn't. :-(

This works with one level of LI's. However, with more than one, the
nested elements have offsetHeight and clientTop (among others) that
are set to 0 (zero). (And even more peculiar - using the FF debugger,
the embedded stacked anchor strings have apparently been converted to
a single string with embedded line breaks).

"stacked anchor strings"? Can you post an example of the HTML that
you are trying to manipulate? Or a link to a minimal test case?

Anyway, I don't get it.

Nor do I. ;-)

The question: how do I get positioning information for nested UL/LI
elements (in both FF and IE6&7).

Matt Kruse has an object position library, have you tried it?

<URL: http://www.javascripttoolbox.com/lib/objectposition/ >

It's not perfect and may not work for your situation, but it's been
helpful in getting me over a few similar hurdles. Most I'd recommend
using pure CSS and HTML as much as possible, depending on script for
position (unless you keep the HTML simple) is generally a bad idea.
 
T

Thomas 'PointedEars' Lahn

Henrik said:
I'm trying to spoof Google's vertical tabs in a vertical menu
structured with nested UL/LI elements.

To do this, I need to find out where the anchor in the LI is, and then
create an absolute positioned div to bridge the space between the menu
and the content page.

This works with one level of LI's. However, with more than one, the
nested elements have offsetHeight and clientTop (among others) that
are set to 0 (zero). (And even more peculiar - using the FF debugger,
the embedded stacked anchor strings have apparently been converted to
a single string with embedded line breaks).

Anyway, I don't get it.

This may surprise you, but most (if not all) client-side Google code is
considered junk and harmful. Try this instead:

http://www.google.com/search?q=css+menu&filter=0


PointedEars
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top