Nieuw lid |
|
Beste...,
Ik ben waarschijnlijk de zoveelste die deze vraag gaat stellen, maar ik kom er niet uit ondanks dat ik veel heb gezocht op dit onderwerp.
Wanneer ik mijn website in IE7 bekijk, werkt het rollover menu prima.
Als ik het in IE6 bekijk verschuift het menu en de menu-items staan niet meer naast elkaar. Zie hier de link.
Nu lees ik veel over hover.htc, maar daar kom ik niet uit.
Kan iemand me vertellen hoe ik het kan oplossen?
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="jqueryslidemenu.css"/>
<!--[if lte IE 7]>
<style type="text/css">
html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="jqueryslidemenu.js"></script>
</head>
<body>
<div id="myslidemenu" class="jqueryslidemenu">
<ul>
<li><a href="index.php" class="jqueryslidemenu">home</a></li>
<li><a href="werk.php" class="jqueryslidemenu">werk</a></li>
<li><a href="activity.php" class="jqueryslidemenu">activity</a>
<ul>
<li><a href="#">sub item</a></li>
<li><a href="#">sub item</a></li>
<li><a href="#">sub item</a></li>
<li><a href="#">sub item</a></li>
</ul>
<li><a href="organisatie.php" class="jqueryslidemenu">organisatie</a>
<ul>
<li><a href="structuur.php">structuur</a></li>
<li><a href="directie.php">directie</a></li>
<li><a href="partners.php">partners</a></li>
</ul>
</li>
<li><a href="klanten.php" class="jqueryslidemenu">klanten</a></li>
<li><a href="contact.php" class="jqueryslidemenu">contact</a></li>
<li><a href="route.php" class="jqueryslidemenu">route</a>
<ul>
<li><a href="plattegrond.php">plattegrond</a></li>
<li><a href="tomtom.php">tomtomadres</a></li>
</ul>
</li>
</li>
</ul>
<br style="clear: left" />
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link rel="stylesheet" type="text/css" href="jqueryslidemenu.css"/> <!--[if lte IE 7]> <style type="text/css"> html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/ </style> <![endif]--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script type="text/javascript" src="jqueryslidemenu.js"></script> </head> <body> <div id="myslidemenu" class="jqueryslidemenu"> <ul> <li><a href="index.php" class="jqueryslidemenu">home</a></li> <li><a href="werk.php" class="jqueryslidemenu">werk</a></li> <li><a href="activity.php" class="jqueryslidemenu">activity</a> <ul> <li><a href="#">sub item</a></li> <li><a href="#">sub item</a></li> <li><a href="#">sub item</a></li> <li><a href="#">sub item</a></li> </ul> <li><a href="organisatie.php" class="jqueryslidemenu">organisatie</a> <ul> <li><a href="structuur.php">structuur</a></li> <li><a href="directie.php">directie</a></li> <li><a href="partners.php">partners</a></li> </ul> </li> <li><a href="klanten.php" class="jqueryslidemenu">klanten</a></li> <li><a href="contact.php" class="jqueryslidemenu">contact</a></li> <li><a href="route.php" class="jqueryslidemenu">route</a> <ul> <li><a href="plattegrond.php">plattegrond</a></li> <li><a href="tomtom.php">tomtomadres</a></li> </ul> </li> </li> </ul> <br style="clear: left" /> </div> </body> </html>
CSS:
.jqueryslidemenu{
font: bold 13px Arial;
background: #ffffff;
width: 70%;
}
.jqueryslidemenu ul{
margin: 0;
padding: 2px 10px;
list-style-type: none;
}
/*Top level list items*/
.jqueryslidemenu ul li{
position: relative;
display: block;
float: left;
}
/*Top level menu link items style*/
.jqueryslidemenu ul li a{
display: block;
background: #ffffff; /*background of tabs (default state)*/
color: #2d2b2b;
padding: 2px 10px;
color: #2d2b2b;
text-decoration: none;
}
* html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
display: block;
}
.jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{
color: #000000;
}
.jqueryslidemenu ul li a:hover{
background: #ffffff; /*tab link background during hover state*/
color: #999999;
}
/*1st sub level menu*/
.jqueryslidemenu ul li ul{
position: absolute;
left: 0;
display: block;
visibility: hidden;
}
/*Sub level menu list items (undo style from Top level List Items)*/
.jqueryslidemenu ul li ul li{
display: block;
float: none;
}
/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.jqueryslidemenu ul li ul li ul{
top: 0;
}
/* Sub level menu links style */
.jqueryslidemenu ul li ul li a{
font: bold 13px Arial;
width: 80px; /*width of sub menus*/
padding: 2px 10px;
margin: 0;
border-top-width: 0;
border-bottom: 1px solid gray;
}
.jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/
background: #eff9ff;
color: black;
}
.jqueryslidemenu{ font: bold 13px Arial; background: #ffffff; width: 70%; } .jqueryslidemenu ul{ margin: 0; padding: 2px 10px; list-style-type: none; } /*Top level list items*/ .jqueryslidemenu ul li{ position: relative; display: block; float: left; } /*Top level menu link items style*/ .jqueryslidemenu ul li a{ display: block; background: #ffffff; /*background of tabs (default state)*/ color: #2d2b2b; padding: 2px 10px; color: #2d2b2b; text-decoration: none; } * html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/ display: block; } .jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{ color: #000000; } .jqueryslidemenu ul li a:hover{ background: #ffffff; /*tab link background during hover state*/ color: #999999; } /*1st sub level menu*/ .jqueryslidemenu ul li ul{ position: absolute; left: 0; display: block; visibility: hidden; } /*Sub level menu list items (undo style from Top level List Items)*/ .jqueryslidemenu ul li ul li{ display: block; float: none; } /*All subsequent sub menu levels vertical offset after 1st level sub menu */ .jqueryslidemenu ul li ul li ul{ top: 0; } /* Sub level menu links style */ .jqueryslidemenu ul li ul li a{ font: bold 13px Arial; width: 80px; /*width of sub menus*/ padding: 2px 10px; margin: 0; border-top-width: 0; border-bottom: 1px solid gray; } .jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/ background: #eff9ff; color: black; }
Javascript:
/*********************
//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/
//* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering
//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/
*********************/
//Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
var arrowimages={down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']}
var jqueryslidemenu={
animateduration: {over: 200, out: 100}, //duration of slide in/ out animation, in milliseconds
buildmenu:function(menuid, arrowsvar){
jQuery(document).ready(function($){
var $mainmenu=$("#"+menuid+">ul")
var $headers=$mainmenu.find("ul").parent()
$headers.each(function(i){
var $curobj=$(this)
var $subul=$(this).find('ul:eq(0)')
this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1? true : false
$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
$curobj.hover(
function(e){
var $targetul=$(this).children("ul:eq(0)")
this._offsets={left:$(this).offset().left, top:$(this).offset().top}
var menuleft=this.istopheader? 0 : this._dimensions.w
menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
if ($targetul.queue().length<=1) //if 1 or less queued animations
$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
},
function(e){
var $targetul=$(this).children("ul:eq(0)")
$targetul.slideUp(jqueryslidemenu.animateduration.out)
}
) //end hover
}) //end $headers.each()
$mainmenu.find("ul").css({display:'none', visibility:'visible'})
}) //end document.ready
}
}
//build menu with ID="myslidemenu" on page:
jqueryslidemenu.buildmenu("myslidemenu", arrowimages)
/********************* //* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/ //* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering //* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/ *********************/ //Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs): var arrowimages={down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']} var jqueryslidemenu={ animateduration: {over: 200, out: 100}, //duration of slide in/ out animation, in milliseconds buildmenu:function(menuid, arrowsvar){ jQuery(document).ready(function($){ var $mainmenu=$("#"+menuid+">ul") var $headers=$mainmenu.find("ul").parent() $headers.each(function(i){ var $curobj=$(this) var $subul=$(this).find('ul:eq(0)') this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} this.istopheader=$curobj.parents("ul").length==1? true : false $subul.css({top:this.istopheader? this._dimensions.h+"px" : 0}) $curobj.hover( function(e){ var $targetul=$(this).children("ul:eq(0)") this._offsets={left:$(this).offset().left, top:$(this).offset().top} var menuleft=this.istopheader? 0 : this._dimensions.w menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft if ($targetul.queue().length<=1) //if 1 or less queued animations $targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over) }, function(e){ var $targetul=$(this).children("ul:eq(0)") $targetul.slideUp(jqueryslidemenu.animateduration.out) } ) //end hover }) //end $headers.each() $mainmenu.find("ul").css({display:'none', visibility:'visible'}) }) //end document.ready } } //build menu with ID="myslidemenu" on page: jqueryslidemenu.buildmenu("myslidemenu", arrowimages)
|