473,756 Members | 2,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2434
On Sep 24, 12:58 pm, Henrik Bechmann <hbechm...@gmai l.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
3041
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
8328
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" value="Next >"></a> </p> </form>
0
1488
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 understand the desired behavior: parent inline elements should not stretch in height to fit nested child inline elements that are taller than the parent. What I'm missing is the "why", the rational behind this behavior that will help me make...
5
2827
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 great, but when I add nested tabs there is a problem with the 'visibility' not being inherited and some parts stay visible in the sub-tabs. Sorry if this is unclear. Here's how I have it layed out: I have a <span> for each content section of...
46
9930
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 already in a loop." Then he goes on to portray a contrived example that doesn't tell me under what conditions a nested loop might be favoured as a solution? i.e. what are nested loops useful for? What kinds of algorithms are served by nested loops?...
6
4618
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" - There's a Class, which we'll call "classDocument" Thus, when an instance of each the form and the class are instantiated, they each will hold the same data, albeit be independent of each other. To keep the two in perfect sync with each other,...
12
7502
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 it to reset info in a combo box. Below is some sample code for my view interface and the presenter: public interface IDevToolView
6
2055
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 using TDD as well to improve our ability to refactor... you probably all know this approach. Although the user iterface is supposedly one of the last things that you need to do, this is a web app and we have multiple nested Repeaters on the page....
1
11816
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 XmlNodeList. I am trying to deserialize the nodes using a foreach as follows: foreach(XmlNode lineItem in LineItemsNodeList) An abbreviated example of the nested lineItem node looks like this:
0
9255
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.