Navigation bar help please (CSS)

play around with your #nav ul li. try using left and top instead of setting margins. Also, using ems for this sort of thing isn't something I'd do

you're also using javascript which isn't necessary for this sort of thing. the following won't work in IE6, but it will in other browsers. you can use javascript to make it work in IE6

edit:

copy that into a text file:

Code:
<html>
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}
ul {
	width: 200px;
	list-style: none;
}
a {
	display: block;
}
ul li ul {
	display: none;
	visibility: hidden;
	position: absolute;
	top: 0;
	left: 200px;
}
ul li ul li {
	background: #fc0;
}
ul li {
	position: relative;
	background: #cf0;
}
ul li:hover ul {
	display: block;
	visibility: visible;
}
</style>
<body>
<ul>
 <li><a href="#">O1</a>
  <ul>
   <li><a href="#">S1</a></li>
   <li><a href="#">S2</a></li>
  </ul>
 </li>
 <li><a href="#">O2</a>
 	<ul>
   <li><a href="#">S3</a></li>
   <li><a href="#">S4</a></li>
  </ul>
 </li>
 <li><a href="#">O2</a>
 	<ul>
   <li><a href="#">S5</a></li>
   <li><a href="#">S6</a></li>
  </ul>
 </li>
</ul>
</body>
</html>

works in firefox and (almost certainly) IE7.
 
Last edited:
I tried what you said. (not to the example) but no joy. I've read that although CSS is pretty flexible in terms on maintenance, it's Browser support is something to be desired :(
IE6 and 7 work fine.. it's FF it doesn't work.


Is there any php I could use which does simular?
 
try that example - imo it's the best way to do popup menus as it doesn't require javascript (unless you're still using a sucky old browser)

if something works in IE6 and IE7 but not Firefox, it's my opinion that the way you're doing things needs to be changed. FF is much more standards compliant, and if it doesn't work there it's less likely to work in Opera, Safari et al.

php isn't really one for visual stuff like this
 
Back
Top Bottom