Jump to content

Tried conding the meny diffrent but still shows wrong


Recommended Posts

Hello everyone.Thought I start a new topic becuse now I have a new problem :) might have read this topic http://w3schools.invisionzone.com/index.php?showtopic=16387there I hade the problem that Firefox gave an unwhanted padding and I couldent fix it ( dident whant to use another java script)So I made a new one its alot better, loads alot faster and works wonders in Firefox but now I have a new issue.In explorer the drop down meny pops up to the right instead of just under it.Please take a look I am going bonkers on the drop down meny, one browser never seem to be happy.http://www.topfreegameservers.comyou can check view source if you like, but I sum it up here to .

#meny {	position:absolute;	left:50px;	top:339px;	width:763px;	height:52px;	z-index:6;	padding-top:21px;	background-image:url(images/menytop.gif);	background-repeat:repeat-x;}#nav, #nav ul {	 padding: 0;	 margin: 0;	 list-style: none;text-align:center; }  #nav a {	 display: block;	 width: 10em;} #nav li {	 float: left;	 width: 10em;height:20px; }#nav li ul {	 position: absolute;	 width: 10em;	 left: -999em;background-color: #deed85;margin-top:31px;border-bottom:#336699 1px solid;border-left:#336699 1px solid;border-right:#336699 1px solid;text-align:left;padding-left:10px;}#nav li:hover ul {	 left: auto; }#nav li:hover ul, #nav li.sfhover ul {	 left: auto; }#styleone{position:relative;display:block;height:31px;font-size:11px;font-weight:bold;background:transparent url(images/bgOFF.gif) repeat-x top left;font-family:Arial,Verdana,Helvitica,sans-serif;}#styleone ul{margin:0;padding:0;list-style-type:none;width:auto;}#styleone ul li{display:block;float:left;}#styleone ul li a{display:block;float:left;color:#000;text-decoration:none;padding:6px 20px 0 0 0px;height:70px;}#styleone ul li a:hover,#styleone ul li a.current{color:#fff;position: static;}

java script so it can work in explorer

<script type="text/javascript"><!--//--><![CDATA[//><!--sfHover = function() {	var sfEls = document.getElementById("nav").getElementsByTagName("LI");	for (var i=0; i<sfEls.length; i++) {		sfEls[i].onmouseover=function() {			this.className+=" sfhover";		}		sfEls[i].onmouseout=function() {			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");		}	}}if (window.attachEvent) window.attachEvent("onload", sfHover);//--><!]]></script>

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...