Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertical CSS menu using "Sliding Doors Technique" 1

Status
Not open for further replies.

Thingol

Technical User
Jan 2, 2002
169
Hi all,

I have built a menu using css which you can find here. The CSS can be found here.

The menu looks great in Firefox and Opera, and on first sight, even IE seems to render thing correctly. However, when you move the mouse over the menu, you'll notice that the hover state is not displayed correctly in IE, whereas Firefox and Opera are doing things right. I therefore think that my code isn't wrong, but that IE is trying giving doing its best not to go along with web standards. Does anyone have an idea what might be going wrong?

Thanks a lot in advance for any help!

Best regards,
Martijn Senden.

I'll also post the code here:

Menu.htm
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="FW MX 2004 Generic HTML">
<link rel="stylesheet" type="text/css" href="Menu.css">
</head>

<body>
<div id="menuposition">
  <ul>
   <div id="menutoprechts"><span id="menutoplinks"></span></div>
 <li><a href="#" id="current"><span>Welkom</span></a></li>
   <li><a href="#"><span>Koor</span></a></li>
   <li><a href="#"><span>Concerten</span></a></li>
   <li><a href="#"><span>Korenfestivals</span></a></li>
   <li><a href="#"><span>Donateurs</span></a></li>
   <li><a href="#"><span>Gastenboek</span></a></li>
   <div id="menubottomrechts"><span id="menubottomlinks"></span></div>
  </ul>
</div>
</body>
</html>

Menu.css
Code:
/* CSS Document */

#menuposition {
  width:10em;
  background:yellow;
  font-size:93%;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:lighter;
  line-height:inherit;
  }

#menuposition ul {
  margin:0;
  padding:0;
  list-style:none;
  }

#menuposition li {
  display:inline;
  padding:38px 0 0 0;
  }

#menuposition a {
 display:block;
 background:url("Images1024x768/2_Menu/MenuKnopRechtsBoth.gif") no-repeat right top;
 margin:0;
 padding:0 10px 0 0;
 text-decoration: none;
 }

#menuposition a span {
  display:block;
  background:url("Images1024x768/2_Menu/MenuKnopLinksBoth.gif") no-repeat left top;
  padding:2px 0 2px 0;
  text-align: center;
  color: #F1F1E3;
  }

#menuposition a:hover, #menuposition a:hover span, #menuposition #current, #menuposition #current span {
  background-position:100% -60px;
  color: #FFFFF7;
  }

#menuposition a:hover span, #menuposition #current span{
  background-position:0% -60px;
  }

#menutoprechts {
  display: block;
  height: 1.565em;
  background:url("Images1024x768/2_Menu/MenuTopRechts.gif") no-repeat right top;
  }

#menutoplinks {
  display: block;
  height: 1.565em;
  background:url("Images1024x768/2_Menu/MenuTopLinks.gif") no-repeat left top;
  }

#menubottomrechts {
  display: block;
  height: 2.086666em;
  background:url("Images1024x768/2_Menu/MenuBottomRechts.gif") no-repeat right bottom;
  }

#menubottomlinks {
  display: block;
  height: 2.086666em;
  background:url("Images1024x768/2_Menu/MenuBottomLinks.gif") no-repeat left bottom;
  }

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Honestly, I was intrigued by your problem. I think you did a good job but I also think IE didn't mess up too bad. You had your share of errors:

1. <div> tags cannot be inside list tags (<ul>). I removed them and remained the same in the three tested browsers.

2. You confused the browser just a little too much. You put two inline elements (<a> and <span>) inside a block element (<li>). That could pass, but you made a switcheroo and made a and span block and li inline. While it is correct to change a and span to block in your case, li is still a block (every li starts a new block). I fixed that and IE started behaving with the hovering but the menu looked ugly. As an aside, you put a 38px top padding to an inline element, which was completely ignored.

3. With that code, Mozilla and Opera were happy, IE still had some gaps which were too big. That was fixed by specifying height: 100%; for the a tag. It does not mess other browsers, but brings IE home.

4. Enjoy:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="FW MX 2004 Generic HTML">
<style type="text/css">

#menuposition {
  width: 10em;
  background: darkgreen;
  font-size: 93%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: lighter;
}

#menuposition ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#menuposition a {
 display: block;
 background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
 margin: 0;
 padding: 0 10px 0 0;
 text-decoration: none;
 height: 100%;
 }

#menuposition a span {
  display: block;
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  padding: 2px 0 2px 0;
  text-align: center;
  color: #F1F1E3;
  }

#menuposition a:hover, #menuposition a:hover span, #menuposition #current, #menuposition #current span {
  background-position: 100% -60px;
  color: #FFFFF7;
  }

#menuposition a:hover span, #menuposition #current span {
  background-position:0% -60px;
  }

#menutoprechts {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menutoplinks {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopLinks.gif)[/URL] no-repeat left top;
  }

#menubottomrechts {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomRechts.gif)[/URL] no-repeat right bottom;
  }

#menubottomlinks {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomLinks.gif)[/URL] no-repeat left bottom;
  }
</style>
</head>

<body>
<div id="menuposition">
  <div id="menutoprechts"><span id="menutoplinks"></span></div>
  <ul>
     <li><a href="#" id="current"><span>Welkom</span></a></li>
     <li><a href="#"><span>Koor</span></a></li>
     <li><a href="#"><span>Concerten</span></a></li>
     <li><a href="#"><span>Korenfestivals</span></a></li>
     <li><a href="#"><span>Donateurs</span></a></li>
     <li><a href="#"><span>Gastenboek</span></a></li>
  </ul>
  <div id="menubottomrechts"><span id="menubottomlinks"></span></div>
</div>
</body>
</html>
 
Thanks so much! I used the display:inline to remove the whitespace from IE, but the height:100% line works just as well, without confusing IE!

One more thing though. I want to make a submenu to this menu, by making a two-level nested list out of the original list. No problem in itself, but I want to move the submenu to an area just below the main list. I have managed to do that, but I needed a div around the submenu <ul> within the main menu <ul>. You state that this cannot be done. What exactly do you mean by that? Do you mean it's semantically incorrect, or do you mean it will give problems with rendering the page in some browsers? Would it be possible to displace the submenu to a location below the menu without using the positioning div I described?

Thanks a lot for your comments on my code, they were really really helpful!! A star for you! This forum has helped me out so often, it's the best forum I have come around so far!

Best regards,
Martijn Senden.

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Come to think of it. I had that menu working, before using the sliding doors technique. Now I'm not so sure the positioningt would still work when the font size in the browser is changed...

Any ideas on how I could make this work?

Thanks again!

Best regards,
Martijn Senden.

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
You can't have a <div> as a direct descendant of a <ul>, the only element that can go in a <ul> is a <li>. That's what Vrag was pointing out. You can put (almost) anything in an <li> as it's a block element, so you can do something like this:
Code:
<ul>
   <li>Item 1</li>
   <li>
      <div class="submenu">
         <ul>
           <li>Subitem 1</li>
         </ul>
     </div>
  </li>
</ul>


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Hi there,

I'm trying to implement your suggestion, but I'm really messing things up! Well. Here's the code, I'm not at all sure what is wrong, but there are plenty of errors, at least, when I view the page, I get a total mess.

I hope anyone can help me get going with this?

Thanks a lot!

Best regards,
Martijn Senden.

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Sorry, I forgot the actual code in my last post...

HTML
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Menu Sirena</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="Menu.css">
</head>
<body>
<div id="menuposition">
  <div id="menutoprechts"><span id="menutoplinks"></span></div>
  <ul>
     <li><a href="#" id="current"><span>Welkom</span></a></li>
     <li><a href="#"><span>Koor</span></a></li>
     <li>
	    <div class="submenuposition">
              <div id="submenutoprechts"><span id="submenutoplinks"></span></div>
			  <li><a href="#"><span>Bestuur</span></a></li>
		      <li><a href="#"><span>Dirigent</span></a></li>
			  <li><a href="#"><span>Leden</span></a></li>
			  <li><a href="#"><span>Vacatures</span></a></li>
              <div id="submenubottomrechts"><span id="submenubottomlinks"></span></div>
		   </ul>
        </div>
     </li>
	 <li><a href="#"><span>Concerten</span></a></li>
     <li>
	    <div class="submenuposition">
              <div id="submenutoprechts"><span id="submenutoplinks"></span></div>
			  <li><a href="#"><span>2005</span></a></li>
		      <li><a href="#"><span>2004</span></a></li>
			  <li><a href="#"><span>2003</span></a></li>
			  <li><a href="#"><span>Eerdere jaren</span></a></li>
              <div id="submenubottomrechts"><span id="submenubottomlinks"></span></div>
           </ul>
        </div>
     </li>
	 <li><a href="#"><span>Korenfestivals</span></a></li>
     <li><a href="#"><span>Donateurs</span></a></li>
     <li><a href="#"><span>Gastenboek</span></a></li>
  </ul>
  <div id="menubottomrechts"><span id="menubottomlinks"></span></div>
</div>
</body>
</html>

CSS
Code:
/* CSS for [URL unfurl="true"]http://www.sirena.nu[/URL] */

#menuposition {
  position: absolute;
  top:10%;
  left:20%;
  width: 10em;
  background: darkgreen;
  font-size: 93%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: lighter;
}

#menuposition ul, #menuposition ul li ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#menuposition a, #submenuposition a {
 display: block;
 background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
 margin: 0;
 padding: 0 10px 0 0;
 text-decoration: none;
 height: 100%;
 }

#submenuposition a {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
  }

#menuposition a span, #submenuposition a span {
  display: block;
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  padding: 2px 0 2px 0;
  text-align: center;
  color: #F1F1E3;
  }

#submenuposition a span {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  }

#menuposition a:hover, #menuposition a:hover span, #menuposition #current, #menuposition #current span, #submenuposition a:hover, #submenuposition a:hover span, #submenuposition #current, #submenuposition #current span  {
  background-position: 100% -60px;
  color: #FFFFF7;
  }

#menuposition a:hover span, #menuposition #current span, #submenuposition a:hover span, #submenuposition #current span {
  background-position:0% -60px;
  }

.submenuposition {
  position: absolute;
  top: 14em;
  }

#menutoprechts, #submenutoprechts {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#submenutoprechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menutoplinks, #submenutoplinks {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopLinks.gif)[/URL] no-repeat left top;
  }

#submenutoplinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menubottomrechts, #submenubottomrechts {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomRechts.gif)[/URL] no-repeat right bottom;
  }

#submenubottomrechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menubottomlinks, #submenubottomlinks {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomLinks.gif)[/URL] no-repeat left bottom;
  }

#submenubottomlinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Ok, I had some errors in the CSS, i used # for some of the classes. They've been replaced now. Also, I replaced the id's for all the submenu divs with classes, since they're being used for multiple submenu's.

This however, doesn't solve anything really. It's still a mess.

I hope anyone can make anything out of it! Thanks a lot.

Best regards,
Martijn Senden.



The code:

HTML
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Menu Sirena</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="Menu.css">
</head>
<body>
<div id="menuposition">
  <div id="menutoprechts"><span id="menutoplinks"></span></div>
  <ul>
     <li><a href="#" id="current"><span>Welkom</span></a></li>
     <li><a href="#"><span>Koor</span></a></li>
     <li>
	    <div class="submenuposition">
              <div class="submenutoprechts"><span class="submenutoplinks"></span></div>
			  <li><a href="#"><span>Bestuur</span></a></li>
		      <li><a href="#"><span>Dirigent</span></a></li>
			  <li><a href="#"><span>Leden</span></a></li>
			  <li><a href="#"><span>Vacatures</span></a></li>
              <div class="submenubottomrechts"><span class="submenubottomlinks"></span></div>
		   </ul>
        </div>
     </li>
	 <li><a href="#"><span>Concerten</span></a></li>
     <li>
	    <div class="submenuposition">
              <div class="submenutoprechts"><span class="submenutoplinks"></span></div>
			  <li><a href="#"><span>2005</span></a></li>
		      <li><a href="#"><span>2004</span></a></li>
			  <li><a href="#"><span>2003</span></a></li>
			  <li><a href="#"><span>Eerdere jaren</span></a></li>
              <div class="submenubottomrechts"><span class="submenubottomlinks"></span></div>
           </ul>
        </div>
     </li>
	 <li><a href="#"><span>Korenfestivals</span></a></li>
     <li><a href="#"><span>Donateurs</span></a></li>
     <li><a href="#"><span>Gastenboek</span></a></li>
  </ul>
  <div id="menubottomrechts"><span id="menubottomlinks"></span></div>
</div>
</body>
</html>

CSS
Code:
/* CSS for [URL unfurl="true"]http://www.sirena.nu[/URL] */

#menuposition {
  position: absolute;
  top:10%;
  left:20%;
  width: 10em;
  background: darkgreen;
  font-size: 93%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: lighter;
}

#menuposition ul, #menuposition ul li ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#menuposition a, .submenuposition a {
 display: block;
 background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
 margin: 0;
 padding: 0 10px 0 0;
 text-decoration: none;
 height: 100%;
 }

.submenuposition a {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
  }

#menuposition a span, .submenuposition a span {
  display: block;
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  padding: 2px 0 2px 0;
  text-align: center;
  color: #F1F1E3;
  }

.submenuposition a span {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  }

#menuposition a:hover, #menuposition a:hover span, #menuposition #current, #menuposition #current span, .submenuposition a:hover, .submenuposition a:hover span, .submenuposition #current, .submenuposition #current span  {
  background-position: 100% -60px;
  color: #FFFFF7;
  }

menuposition a:hover span, #menuposition #current span, .submenuposition a:hover span, .submenuposition #current span {
  background-position:0% -60px;
  }

.submenuposition {
  position: absolute;
  top: 14em;
  }

#menutoprechts, .submenutoprechts {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

.submenutoprechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menutoplinks, .submenutoplinks {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopLinks.gif)[/URL] no-repeat left top;
  }

.submenutoplinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menubottomrechts, .submenubottomrechts {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomRechts.gif)[/URL] no-repeat right bottom;
  }

.submenubottomrechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menubottomlinks, .submenubottomlinks {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomLinks.gif)[/URL] no-repeat left bottom;
  }

.submenubottomlinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Hi all,

I'm sorry, I shouldn't have posted all that code wthout really making a big effort first. I have however done that now, and it's all working fine in Firefox. I can't test Opera right now, but I think things will be ok there as well.

In IE however, the displaced submenu leaves an empty space in the main list.

Can this be solved?

Best regards,
Martijn Senden.

Code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Menu Sirena</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="Menu.css">
</head>
<body>
<div id="menuposition">
  <div id="menutoprechts"><span id="menutoplinks"></span></div>
  <ul>
     <li><a href="#" id="current"><span>Welkom</span></a></li>
     <li><a href="#"><span>Koor</span></a></li>
     <li>
	    <div class="submenuposition">
           <ul>
			  <div class="submenutoprechts"><span class="submenutoplinks"></span></div>
			  <li><a href="#"><span>Bestuur</span></a></li>
		      <li><a href="#"><span>Dirigent</span></a></li>
			  <li><a href="#"><span>Leden</span></a></li>
			  <li><a href="#"><span>Vacatures</span></a></li>
              <div class="submenubottomrechts"><span class="submenubottomlinks"></span></div>
		   </ul>
        </div>
     </li>
	 <li><a href="#"><span>Concerten</span></a></li>
     <li class="onzichtbaar">
	    <div class="submenuposition">
           <ul>
			  <div class="submenutoprechts"><span class="submenutoplinks"></span></div>
			  <li><a href="#"><span>2005</span></a></li>
		      <li><a href="#"><span>2004</span></a></li>
			  <li><a href="#"><span>2003</span></a></li>
			  <li><a href="#"><span>Eerdere jaren</span></a></li>
              <div class="submenubottomrechts"><span class="submenubottomlinks"></span></div>
           </ul>
        </div>
     </li>
	 <li><a href="#"><span>Korenfestivals</span></a></li>
     <li><a href="#"><span>Donateurs</span></a></li>
     <li><a href="#"><span>Gastenboek</span></a></li>
  </ul>
  <div id="menubottomrechts"><span id="menubottomlinks"></span></div>
</div>
</body>
</html>

CSS
Code:
/* CSS for [URL unfurl="true"]http://www.sirena.nu[/URL] */

#menuposition {
  position: absolute;
  top:10%;
  left:20%;
  width: 10em;
  background: darkgreen;
  font-size: 93%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: lighter;
}

#menuposition ul, #menuposition ul li ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.onzichtbaar {
   display: none;
   }

#menuposition a, .submenuposition a {
 display: block;
 background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
 margin: 0;
 padding: 0 10px 0 0;
 text-decoration: none;
 height: 100%;
 }

.submenuposition a {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopRechtsBoth.gif)[/URL] no-repeat right top;
  }

#menuposition a span, .submenuposition a span {
  display: block;
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  padding: 2px 0 2px 0;
  text-align: center;
  color: #F1F1E3;
  }

.submenuposition a span {
  background: url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuKnopLinksBoth.gif)[/URL] no-repeat left top;
  }

#menuposition a:hover, #menuposition a:hover span, #menuposition #current, #menuposition #current span, .submenuposition a:hover, .submenuposition a:hover span, .submenuposition #current, .submenuposition #current span  {
  background-position: 100% -60px;
  color: #FFFFF7;
  }

#menuposition a:hover span, #menuposition #current span, .submenuposition a:hover span, .submenuposition #current span {
  background-position:0% -60px;
  }

.submenuposition {
  position: absolute;
  top: 13em;
  width: 10em
  }

#menutoprechts, .submenutoprechts {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

.submenutoprechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopRechts.gif)[/URL] no-repeat right top;
  }

#menutoplinks, .submenutoplinks {
  display: block;
  height: 1.565em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopLinks.gif)[/URL] no-repeat left top;
  }

.submenutoplinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuTopLinks.gif)[/URL] no-repeat left top;
  }

#menubottomrechts, .submenubottomrechts {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomRechts.gif)[/URL] no-repeat right bottom;
  }

.submenubottomrechts {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomRechts.gif)[/URL] no-repeat right bottom;
  }

#menubottomlinks, .submenubottomlinks {
  display: block;
  height: 2.086666em;
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomLinks.gif)[/URL] no-repeat left bottom;
  }

.submenubottomlinks {
  background:url([URL unfurl="true"]http://www.freepgs.com/sendeman/Images1024x768/2_Menu/MenuBottomLinks.gif)[/URL] no-repeat left bottom;
  }

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Hi all,

I've posted the page again on:
link [URL unfurl="true"]http://www.freepgs.com/sendeman/Menu.htm[/url]
and the css is on:
[URL unfurl="true"]http://www.freepgs.com/sendeman/Menu.css[/url]

I've been working on this all afternoon, but can't seem to fix things entirely.

The whitespace in IE is still there. I have been fiddling with position: relative to get rid of the whitespace, but to no avail.

And then there's a second problem: There is some whitespace showing up between the #menutoprechts[/] div and the #menuposition ul[/] list, depending on the size of the browser window. Tweaking the height of the #menutoprechts and #menutoplinks div and span changes the behaviour, but I can't say I understand why. I don't see any systematics in it.

I hope anyone here may be able to help me out.

I would be really really grateful!!

Best regards,
Martijn Senden.

P.s. I re-applied the background-images for the submenu, because when I get a chance, I'll make the submenu a different color, so then the submenu list will need different images from the main menu list.

In the Beginning there was nothing, which exploded.

--Terry Pratchett, Lords and Ladies--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top