Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Incorrect display in Internet Explorer 6 and below


  • Please log in to reply

#1
promoter

promoter

    Member

  • Member
  • PipPip
  • 31 posts
I've designed a site with a horizontal drop down menu. But in Internet Explorer 6, it does not display horizontally; it displays vertically, which looks bad. Is there any fix I can make in the css?
Here is the link to see what I'm talking about: http://promoterinc.com/new/index.shtml

Below is the include file for the menu and below that is the javascript. To save space, I've attached the css file.

<div class="horizontalcssmenu">
	<table align="center"><tr><td><ul id="cssmenu1">
	  <li><a href="index.shtml" target="_self">home</a></li> 
	  <li><a href="aboutus.shtml" target="_self">about us</a>
	  <ul><li><a href="staff.shtml" target="_self">Our Team</a></li></ul>
	  <li> <a href="services.shtml" target="_self">services</a></li> 
	  <li><a href="portfolio.shtml" target="_self">portfolio</a>
	  <ul>
			<li><a href="logo.shtml">Logo Design</a></li>
			<li><a href="print.shtml">Print Design</a></li>
			<li><a href="website.shtml">Web Design</a></li>
			<li><a href="publicity.shtml">Publicity</a></li>
		</ul>
	  </li> 
	  <li><a href="tips.shtml" target="_self">tips</a>
	  <ul><li><a href="http://promoterinc.blogspot.com/" target="_blank">Smart Marketing Blog</a></li></ul>
	  </li> 
	  <li><a href="news.shtml" target="_self">news</a></li> 
	  <li><a href="contact.shtml" target="_self">contact</a></li>
	
	</ul></td></tr></table>
  </div>

And here is the javascript that is used for it:
var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.

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"
		var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
		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)

Attached Files


  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP