positioning div relative to div

liunx

Guest
Ok, I'm sure there have been previous threads on this, but I couldn't find any. You can see the test page here: <!-- m --><a class="postlink" href="http://campbells.dikaios.net/test.php">http://campbells.dikaios.net/test.php</a><!-- m --><br />
<br />
If you mouse over the baby 'X' in the nav menu, a hidden div pops up(id="babyx_menu"). The absolute positioning looks ok, but what I want to do is place it relative to the div that houses the link in the nav menu (id="nav_babyx").<br />
<br />
I'm sure this is possible, but when I try relative positioning, it places it relative to the page, and I don't see how to set it to place relative to the other div.<!--content-->relative positioning is positioning something relative to where it's position would have been in the normal flow of the page, following elements arent affected by this.<br />
<br />
I don't see a div popup? ie5.5 win Me<!--content-->Bummer...doesn't seem to be working in Mozilla Firebird either...in IE 6 it's fine. Maybe this should be moved to cross-platform, or I should post there, and see what's up? Anyone else NOT see the menu appear when they mouseover baby 'X' in the Nav Menu?<!--content-->I will check it at home as I can't chck in mozilla at work. but it seems to be ok for me in IE6 and you are using absolute positioning. but right off hand I don't see why it doesn't work in mozilla.<br />
<br />
edit: and those pictures are awesome, congratulations<!--content-->Thanks...Pretty awesome huh?<br />
<br />
Anyway...I'd appreciate it if you could check it in mozilla when you get a chance...I'll keep trying stuff till then. Also it doesn't seem to work in NS.<!--content-->yeah it definetly doesn't work in mozilla, but did you do something cos it's there now in ie 5.5?<!--content-->Well, during some cut & paste's from some other stuff I was working on, the onmouseover's were all caps. I changed them to lowercase. That's all I can think of that I did so far, but maybe it helped with 5.5?<!--content-->I can't see what is wrong with this page, I can't get it to work, unless I am so tired it is sitting in front of my face.<br />
<br />
<!-- m --><a class="postlink" href="http://campbells.dikaios.net/test.php">http://campbells.dikaios.net/test.php</a><!-- m --><br />
<br />
but it works on this one so what did you do different?<br />
<!-- m --><a class="postlink" href="http://campbells.dikaios.net/babyx.php">http://campbells.dikaios.net/babyx.php</a><!-- m --><!--content-->test.php is just one menu (for baby 'X'), made out of a hidden div that appears onmouseover. The other pages are using my current menu system, which is completely javascript (and a long one at that). I just want to try to make the menu's a bit cleaner, and a bit more "mine"<!--content-->then you can do this. it will also get rid of those 2 functions you have in this document.<br />
<br />
<br />
<td style="width:80px;"><div id="nav_babyx"><a href=http://www.htmlforums.com/archive/index.php/"babyx.php" class="navlinks" <br />
onmouseover="document.getElementById('babyx_menu').style.visibility='visible'" <br />
onmouseout="document.getElementById('babyx_menu').style.visibility='hidden'">Baby 'X' </a></div></td><br />
<br />
should work in all browsers in this generation<!--content-->Thanks...that works. I had a friend help me with the functions, and I think I screwed em up. Anyway...thanks!<!--content-->you will need to put them in the hidden div as well.<br />
<br />
glad it worked. :cool:<!--content-->Yeah, I figured that, and did it already. ;)<!--content-->Ok, now that I got the div appearing, and dis-appearing in all browsers, back to the original question. Can I make this div position relative to another div? For example, look here: <!-- m --><a class="postlink" href="http://campbells.dikaios.net/test.php">http://campbells.dikaios.net/test.php</a><!-- m --><br />
In the nav bar, Baby 'X' is contained in a div called nav_babyx AND the hidden div is called babyx_menu. Can I tell it to place babyx_menu immediately below nav_babyx?<br />
<br />
What I'm trying to do, is make this menu system work for all browsers (or at least IE, NS, and Mozilla). Right now, it looks fine in IE, BUT in NS and Mozilla it is positioned lower. I actually assume that this is an IE problem, but either way, in mozilla and NS, the gap between the menu and the nav bar makes it almost impossible to get your mouse to the menu without it disappearing.<!--content-->couldn't you just change the position of the div? tell it to load just a little be higher to the top?<br />
<br />
also don't forget about the margins the div gives off.<!--content-->Changing the position of the Divs would make it not work in IE. HOWEVER, your margin suggestion was the key. Not so much the div margins, as the page margins. I hadn't set them, and the defaults are different for IE and everyone else.<br />
<br />
Now I have a question about SSI's (since I've never used them). It seems that MOST of the SSI questions have been answered in this forum. If it should be elsewhere, let me know.<br />
<br />
I think that I should put all the hidden divs for the menu into another file, and have it included right below the body tag in all my pages. The reason? I can update the menus by changing only one file. I know that my host allows SSI, but how do I do this?<!--content-->well since you are using php it is easy. make all your div in the indoueded file then just use this<br />
<br />
</php<br />
include("menu.html");<br />
?><br />
<br />
that is all you do. and yes make is so it is after the body.<!--content-->success...it's up and working at <!-- m --><a class="postlink" href="http://campbells.dikaios.net">http://campbells.dikaios.net</a><!-- m --><br />
it needs a little tweaking, but thanks for all the help.<!--content-->looks good :cool:<!--content-->
 
Back
Top