Racheengel
Neues Mitglied
Hi,
ich bin grade dabei meine erste website zu programmieren und habe nur noch ein Problem und zwar folgendes:
ich habe eine horizontale Navigationleiste gebaut und diese wird auf meinem PC ordentlich angezeigt :
http://s7b.directupload.net/images/100312/tk6j6y3f.jpg
und im Internet Explorer (ja nur da) auf einem anderen PC werden die Elemente der Navigationleiste untereinander angezeigt:
http://s8b.directupload.net/images/100312/qcscems4.jpg
Woran kann das liegen? Und wie kann ichdas Problem beheben?
Der HTML-Code:
Hier die CSS:
und hier die JS:
ich bin grade dabei meine erste website zu programmieren und habe nur noch ein Problem und zwar folgendes:
ich habe eine horizontale Navigationleiste gebaut und diese wird auf meinem PC ordentlich angezeigt :
http://s7b.directupload.net/images/100312/tk6j6y3f.jpg
und im Internet Explorer (ja nur da) auf einem anderen PC werden die Elemente der Navigationleiste untereinander angezeigt:
http://s8b.directupload.net/images/100312/qcscems4.jpg
Woran kann das liegen? Und wie kann ichdas Problem beheben?
Der HTML-Code:
HTML:
<html>
<head>
<title>WunderBunTd</title>
<meta name="description" content="WunderBunTd">
<meta name="keywords" content="WunderBunTd">
<meta name="author" content="Rache">
<meta name="editor" content="html-editor phase 5">
<META NAME="robots" CONTENT="index, follow">
<!-- ****************************** Java einbinden ****************************** -->
<link rel="stylesheet" type="text/css" href="WuBu/csshorizontalmenu.css">
<script type="text/javascript" src="WuBu/csshorizontalmenu.js"> </script>
<!-- ****************************** Java einbinden Ende ****************************** -->
</head>
<body scroll="auto"></body>
<body text="#000000" bgcolor="#FFFFFF" link="#0000ff" alink="#0000ff" vlink="#0000ff">
<!-- ****************************** Pop-Up Menü-Inhalte ****************************** -->
<table align="center" valign="top">
<div class="horizontalcssmenu" align="center">
<ul id="cssmenu1">
<li style="border-left: 1px solid #000000;">
<a href="index.html"> Home </a></li>
<li><a href="Bandmain.html" > Rockband<small> ▼</small></a>
<ul>
<li><a href="Band1.html"> Press </a></li>
<li><a href="Band5.html"> Veranstalterinformationen </a></li> </ul></li></ul>
<br style="clear: center;" />
</div>
</table>
<p id="iepara"> </p>
<br>
<br>
<!-- ****************************** Pop-Up Menü-Inhalte zu Ende ****************************** -->
</body>
</html>
Code:
.horizontalcssmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
}
/*Top level list items*/
.horizontalcssmenu ul li{
position: relative;
display: inline;
float: left;
}
/*Top level menu link items style*/
.horizontalcssmenu ul li a{
display: block;
width: ; /*Width of top level menu link items*/
padding: 2px 8px;
border: 1px solid #000000;
border-left-width: 0;
text-decoration: none;
background: url(weiss.jpg) center center repeat-x;
color: black;
font: bold 13px Tahoma;
}
/*Sub level menu*/
.horizontalcssmenu ul li ul{
left: 0;
top: 0;
border-top: 1px solid #000000;
position: absolute;
display: block;
visibility: hidden;
z-index: 100;
}
/*Sub level menu list items*/
.horizontalcssmenu ul li ul li{
display: inline;
float: none;
}
/* Sub level menu links style */
.horizontalcssmenu ul li ul li a{
width: 200px; /*width of sub menu levels*/
font-weight: normal;
padding: 2px 5px;
background: #000000;
background: url(weiss.jpg) center center repeat-x;
border-width: 0 1px 1px 1px;
}
.horizontalcssmenu ul li a:hover{
background: url(weiss.jpg) center center repeat-x;
}
.horizontalcssmenu ul li ul li a:hover{
background: #FFFFFF;
}
* html p#iepara{ /*For a paragraph (if any) that immediately follows menu, add 1em top spacing between the two in IE*/
padding-top: 1em;
}
* html.horizontalcssmenu ul li { float: left; height: 1%; }
* html.horizontalcssmenu ul li a { height: 1%; }
Code:
var cssmenuids=["cssmenu1"]
var csssubmenuoffset=-1
function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
ultags[t].parentNode.onmouseover=function(){
this.style.zIndex=100
this.getElementsByTagName("ul")[0].style.visibility="visible"
this.getElementsByTagName("ul")[0].style.zIndex=0
}
ultags[t].parentNode.onmouseout=function(){
this.style.zIndex=0
this.getElementsByTagName("ul")[0].style.visibility="hidden"
this.getElementsByTagName("ul")[0].style.zIndex=100
}
}
}
}
if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)