473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

peculiar dom model for nested UL elements

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

Sep 24 '07 #1
1 2396
On Sep 24, 12:58 pm, Henrik Bechmann <hbechm...@gmail.comwrote:
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.
--
Rob

Sep 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nick Chan | last post by:
hello i have implemented joe celko's model to store heirarchy and it works well and nice i have a question about SQL this is the actual table member side left right...
1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
0
by: Darin McGrew | last post by:
Eric Meyer's <http://www.meyerweb.com/eric/css/inline-format.html> is very clear that it is not a simple introduction to the inline formatting model. Unfortunately, that's what I think I need. I...
5
by: horndude77 | last post by:
Ok, this might be for a web designing group, but here's my problem. I'm trying to make a web page with tabs which you can navigate between without the page reloading. I have one set of tabs working...
46
by: Neptune | last post by:
Hello. I am working my way through Zhang's "Teach yourself C in 24 hrs (2e)" (Sam's series), and for nested loops, he writes (p116) "It's often necessary to create a loop even when you are...
6
by: Robert W. | last post by:
I'm building my first major C# program and am try to use best practices everywhere. So I've implemented the "Document/View Model" whereby: - There's a Windows Form, which we'll call "formView" -...
12
by: Doug | last post by:
Hi, I learned a little about the model view presenter pattern at a conference this last week and am experimenting with it. It's working pretty well but I have a question. I am trying to use...
6
by: Bill44077 | last post by:
Hi, I am new to the MVP pattern and one of the main reasons that we are going this route is because we are doing Scrum with 30 day sprints - so we have a continually morphing design. We are...
1
by: =?Utf-8?B?SmVyZW15X0I=?= | last post by:
I am working on an order entry program and have a question related to deserializing nodes with nested elements. The purchase order contains multiple line items which I select using an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.