View Full Version : problem with Drop down/ Overlapping Content script

03-25-2008, 07:43 PM
the script is all good till one problem , when i want to use the script with PHP and im quering information if the line of information is too long so the drop down window becomes TOO long also and spreading all over the screen

any solution ?


03-25-2008, 08:19 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Do you have an explicit width defined within the drop down DIV to limit its width? For example, style="width: 450px"

03-25-2008, 08:25 PM
have it all....actually i just added few more letters to the excist one just to see how it reacts :
<script type="text/javascript" src="C:\Users\Danny\Desktop\VODAHOST\dropdowncontent.js">

* Drop Down/ Overlapping Content- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code



<p>Demo #2 (click): <a href="http://www.dynamicdrive.com/resources/" id="contentlink" rel="subcontent2">Additional Resources</a> </p>

<DIV id="subcontent2" style="position:absolute; visibility: hidden; border: 9px solid black; background-color: lightyellow;height:300px;width:50%;">

<div align="center"><a href="javascript:dropdowncontent.hidediv('subcontent2')">Hide this DIV manuallyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</a></div>


<script type="text/javascript">
//Call dropdowncontent.init("anchorID", "positionString", glideduration, "revealBehavior") at the end of the page:

dropdowncontent.init("contentlink", "right-left", 300, "click")



as you can see i added "yyyyyyyyyy" to get the same effect i want to solve but it expends all over the page

*btw , how can i define the width here in this post box ? that when it comes to the right border it goes one row down ?

thanks again

03-25-2008, 08:35 PM
Well, yyy..... is treated as a single unit in HTML, so it will stretch whatever DIV it's contained in, like an image that's wider than the DIV it's contained in. Regular content should have spaces between words, and in those cases, text that over flow should automatically line break to the next line.

You can use CSS to either hide single unit overflowing content, or enable horizontal scrollbars instead to accommodate it. Those are about your options though:

style="width: 300px; overflow-x: hidden;">

Change hidden to scroll if you wish to enable scrollbars instead.

03-25-2008, 08:49 PM
man you cant belive how u helped me here , this "yyyyyyyyyyyy" i wrote it only to check but OFCOURSE NO ONE WILL WRITE LIKE THAT.

thanks alot !!!!
working perfect !