hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : DHTML Menu Position
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

DHTML Menu Position

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2005, 12:46 AM
RonC RonC is offline
Junior Guru Wannabe
 
Join Date: Jul 2005
Posts: 68

DHTML Menu Position


I am building a website for a customer and they have requested a drop down menu for the navigation part of the site. I have a horizontal navigation bar written in html and positioned with css. I want to replace one of the clickable links in the navigation bar with a DHTML drop down menu.

I found a menu on the simplythebest . net site and pared it down to what I needed. The problem I am having is positioning the script. The page it needs to go in is a fixed width and centers in the browser window. I thought I could just place the menu within the DIV class that keeps the page centered but it does not work. The menu position is relative to the top left corner of the page rather that the enclosing element it resides in. I tried moving the script to different spots and nothing seems to work.

Could it be the the way the script is triggered in the body tag, does this make its position relative to the top left corner and nothing else?

How can I make it move with the rest of the page?

Thanks

Ron

Reply With Quote


Sponsored Links
  #2  
Old 08-24-2005, 01:02 AM
juniperavenue juniperavenue is offline
Junior Guru Wannabe
 
Join Date: Aug 2005
Posts: 70
I have never used this particular menu but somewhere in the stylesheet there should be 'position' field which you can set to relative or absolute. It could be in the CSS file or generated in the div tag itself.

Reply With Quote
  #3  
Old 08-24-2005, 01:31 AM
RonC RonC is offline
Junior Guru Wannabe
 
Join Date: Jul 2005
Posts: 68
Tommar,

I tried changing the style sheet to relative from absolute but it did not work.

Thanks

Reply With Quote
Sponsored Links
  #4  
Old 08-24-2005, 01:33 AM
fastduke fastduke is offline
WHT Addict
 
Join Date: Dec 2003
Location: Earth
Posts: 144
Code would help

__________________
if($php !== $javascript){
echo "Good it's not supposed to be";
}

Reply With Quote
  #5  
Old 08-24-2005, 02:16 AM
lvmike lvmike is offline
Newbie
 
Join Date: Aug 2005
Location: Las Vegas NV
Posts: 20
Try setting the enclosing elements positioning to relative, then set the menu positioning to absolute. This should accomplish what you describe, ie reference the top left of the enclosing element.

Reply With Quote
  #6  
Old 08-24-2005, 01:02 PM
RonC RonC is offline
Junior Guru Wannabe
 
Join Date: Jul 2005
Posts: 68
I have put the code up at this location:

http://www.crockerwebdesign.com/menu/

To simplify things I did not use an external style sheet like the original menu had, I combined all the styles on the index page.

I tried various combinations of absolute and relative positioning with some weird results.

I would like for the menu to move with the box it is enclosed in.

The problem may be the way the script is initiated in the body tag. Maybe this takes it out of the div box where the script is called.

It is a great menu and I would really like to be able to use it.

Lack of knowledge is most lilkely my real problem...

Hmmm...

Reply With Quote
  #7  
Old 08-26-2005, 02:31 PM
avocado avocado is offline
Web Hosting Guru
 
Join Date: Jun 2005
Posts: 289
Best standards-compliant /accessible drop-down menu I've seen:

http://www.alistapart.com/articles/dropdowns/

Reply With Quote
  #8  
Old 08-26-2005, 09:48 PM
RonC RonC is offline
Junior Guru Wannabe
 
Join Date: Jul 2005
Posts: 68
Avocado,

Thanks for the response, I will take a look at it when I get home. I am at my inlaws and they are on a dial up connection. It is painfully slow.

Cheers

Reply With Quote
  #9  
Old 08-28-2005, 05:16 AM
HalfBrian HalfBrian is offline
Junior Guru Wannabe
 
Join Date: Aug 2005
Posts: 44
http://dynamicdrive.com/dynamicindex1/anylinkcss.htm

That is also quite a good script, I have tested it on FireFox and IE, and they both work. IT is also quite easy to styleize.

Reply With Quote
  #10  
Old 08-28-2005, 10:16 PM
RonC RonC is offline
Junior Guru Wannabe
 
Join Date: Jul 2005
Posts: 68
Halfbrian,

I tried the script you supplied and it works nicely. Thanks for taking the time to reply to my post.

Cheers

Ron

Reply With Quote
  #11  
Old 08-29-2005, 08:10 AM
HalfBrian HalfBrian is offline
Junior Guru Wannabe
 
Join Date: Aug 2005
Posts: 44
Im glad I could help, if you need anything else, just post it!

--Brian

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
A Look at the New WHM Interface in Version 11.34 of the cPanel Hosting Control Panel Web Hosting News 2012-11-12 12:57:03
cPanel Conference 2012: What's New with cPanel and WHM with Ken Power Web Hosting News 2012-11-12 13:54:56
Web Hosting Company Newtek Names SVP of Customer Operations Web Hosting News 2012-05-04 16:02:58
Web Host ServInt Appoints VP of Innovation and Technology Web Hosting News 2011-10-26 14:30:13
Open Source Developer Joomla Releases 1.7 CMS with Enhanced Security Tools Web Hosting News 2011-07-19 18:51:20


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?