Results 1 to 3 of 3

Thread: positioning dropdown/overlap content

  1. #1
    Join Date
    Nov 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default positioning dropdown/overlap content

    1) Script Title: overlapcontent probelm

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lapcontent.htm

    3) Describe problem: i would like to adjust the position of the dropped down
    div to a certain point on the screen. since switching between the "right" ,"bottom" and "bottomright" is not specific enough i tried changing the script
    that's incharge of the position at the head section but nothing happens.
    can someone help?

    thanks

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    1.Comment the overlay() in the original script.

    2. put the following function in place of overlay()

    Code:
    function overlay(curobj, subobjstr, left, top){
    	if (document.getElementById){
    		var subobj=document.getElementById(subobjstr)
    		subobj.style.display=(subobj.style.display!="block")? "block" : "none"
    
    		subobj.style.top = top 
    		subobj.style.left = left
    
    		return false
    	}
    else
    	return true
    }
    3. Change the existing overlay() function calls like the following

    Code:
    <b><a href="search.htm" onClick="return overlay(this, 'subcontent',5,50)">Search DD</a></b><br />

    Code:
    <p style="padding-left: 800px"><b><a href="search.htm" onClick="return overlay(this, 'subcontent2', 0, 80)">Show Content</a></b><br />
    4. I've modified the code based on the original script.

  3. #3
    Join Date
    Nov 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi thanks Code Exploiter, but i can't get the positioning to work
    after changing the function and adding values to the call, the div gets stuck
    to a certain point on the screen and changing the values does not influence its position.

    appriciate yr help

    dreli

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •