PDA

View Full Version : Simple modification needed on anylinkcss script



Angry Coder
05-18-2006, 08:24 AM
Hello there,

I am using this script from Dynamic Drive:

http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

It's working fine but I want a little modification to make the drop down menu appears a little bit lower.

An image is attached within the post to clarify what I exactly failed to accomplish.

Your help would be greatly appreciated.

jscheuer1
05-18-2006, 09:46 PM
This works but, it could depend on the rest of your layout. The <br> after 'Hi' is required by Opera to maintain expected document flow, all browsers need the 'clear:left' division.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="anylink.css" />

<script type="text/javascript" src="anylink.js">

/***********************************************
* AnyLink CSS Menu script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<style type="text/css">
.alink {
padding-bottom:20px;
display:block;
float:left;
}
</style>
</head>
<body>
Hi<br>
<!--1st anchor link and menu -->

<a class="alink" href="http://www.dynamicdrive.com" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu1')">Anchor Link</a><span class="alink">&nbsp;&nbsp;</span>

<div id="anylinkmenu1" class="anylinkcss">

<a href="http://www.dynamicdrive.com/">Dynamic Drive</a>
<a href="http://www.cssdrive.com">CSS Drive</a>
<a href="http://www.javascriptkit.com">JavaScript Kit</a>
<a href="http://www.codingforums.com">Coding Forums</a>
<a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a>

</div>

<!--2nd anchor link and menu -->

<a class="alink" href="http://www.dynamicdrive.com" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu2')">Anchor Link 2</a>

<div id="anylinkmenu2" class="anylinkcss" style="width: 150px; background-color: lightyellow">

<a href="http://www.cnn.com/">CNN</a>
<a href="http://www.msnbc.com">MSNBC</a>
<a href="http://www.google.com">Google</a>
<a href="http://news.bbc.co.uk">BBC News</a>

</div>
<div style="clear:left;"></div>
There
</body>
</html>