Connecting Tech Pros Worldwide Forums | Help | Site Map

Navcontainer and IE6 problem

Newbie
 
Join Date: Aug 2007
Posts: 12
#1: Aug 6 '07
Hi,

I've built this navigation using CSS Navcontainer (with Pbmod's help) and it works perfect in every browser and platform apart from IE6!

Here is the HTML

[HTML]<div id="navcontainer">
<ul>
<a href="#">Home page</a>
<a href="#">What's new</a>
<a href="#">About us</a>
<div class="submain"><a href="SubMain_who.html" target="_top">Who we work with</a>
<div class="navcontainersub">
<a href="#">Schools</a>
<a href="localauthorities.html" target="_top">Local Authorities</a>
<a href="#">Charities</a>
</div>
</div>
<div class="submain"><a href="SubMain_services.html" target="_top">Our services</a>
<div class="navcontainersub">
<a href="#">Well-Being</a>
<a href="#">EAP</a>
<a href="#">Headspace</a>
<a href="#" class="current">Training &amp; development</a>
</div>
</div>
<a href="#">Contact us</a>
</ul>
</div>[/HTML]

and the CSS

Expand|Select|Wrap|Line Numbers
  1. #navcontainer {
  2.     float: left;
  3.     padding-top: 0px;
  4.     padding-bottom: 5em;
  5.     width: 173px;
  6.     text-align:left;
  7.     }
  8.  
  9. #navcontainer ul {
  10.     margin: 0;
  11.     padding: 0;
  12.     border: 0;
  13.     font: 12px Trebuchet MS, verdana, arial, sans serif;
  14.     letter-spacing: -0.2px;
  15.     text-indent: 24px;
  16.     height: 21px;
  17.     width:171px;
  18.     list-style:none;
  19.     }
  20.  
  21. #navcontainer a {
  22.     background: url(../images/nav_back.gif);
  23.     display: block;
  24.     width: 171px;
  25.     padding-top: 6px;
  26.     height: 20px;
  27.     }
  28.  
  29. #navcontainer a:link, #navcontainer a:visited {
  30.         color:#000000;
  31.         text-decoration: none;
  32.         }
  33.  
  34. #navcontainer a:hover {
  35.     background: url(../images/nav_back_man.gif);
  36.     color:#FFFFFF;
  37.     text-decoration: none;
  38.     padding-top: 6px;
  39.     height: 20px;
  40.     }    
  41.  
  42. #navcontainer .submain:hover a {
  43.     background: url(../images/nav_back_man.gif);
  44.     }
  45.  
  46. #navcontainer .submain .current {
  47.     background: url(../images/nav_back_man.gif);
  48.     color:#FFFFFF;
  49.     }
  50.  
  51. #navcontainer .submain:hover .navcontainersub a{
  52.     background: url(../images/nav_sub_hover.gif);
  53.     color:#666666;
  54.     }
  55.  
  56. #navcontainer .submain .navcontainersub:hover a {
  57.     background: url(../images/nav_sub_hover.gif);
  58.     color:#666666;
  59.     font: 11px Trebuchet MS,verdana, arial, sans serif;
  60.     text-indent: 30px;
  61.     height: 17px;
  62.     }
  63.  
  64.     /* No Hover on Nav*/
  65. #navcontainer .submain .navcontainersub a {
  66.     background: url(../images/nav_sub_hoverw.gif);
  67.     height: 20px;
  68.     color:#666666;
  69.     font: 11px Trebuchet MS,verdana, arial, sans serif;
  70.     text-indent: 30px;
  71.     height:17px;
  72.     }
  73.  
  74. #navcontainer .submain .navcontainersub {
  75.     background: url(../images/nav_sub_hover.gif);
  76.     }
  77.  
  78. /*------ Sub Nav ------*/
  79.  
  80. #navcontainer .submain .navcontainersub .current {
  81.     background: url(../images/nav_sub_hover_c.gif);
  82.     color:#FFFFFF;
  83.     }
  84.  
  85. #navcontainer .submain:hover .navcontainersub .current{
  86.     background: url(../images/nav_sub_hover_c.gif);
  87.     color:#666666;
  88.     }
  89.  
  90.  
  91. .navcontainersub a {
  92.     background: url(../images/nav_sub_hover.gif);
  93.     display: block;
  94.     letter-spacing: -0.3px;
  95.     width: 171px;
  96.     padding-top: 5px;
  97.     height: 18px;
  98.     }
  99.  
  100. .navcontainersub a:link, .navcontainersub a:visited {
  101.     background: url(../images/nav_sub_hoverw.gif);
  102.     color:#666666;
  103.     text-decoration: none;
  104.     }
It basically makes the sub nav hover when you hover over the main section - check the link here in something better than IE6 PC to see what I mean...

LINK

drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,830
#2: Aug 6 '07

re: Navcontainer and IE6 problem


IE6 does not work with hover on any element but <a>.
Newbie
 
Join Date: Aug 2007
Posts: 12
#3: Aug 6 '07

re: Navcontainer and IE6 problem


I've found this:

Expand|Select|Wrap|Line Numbers
  1. a:hover {
  2.     color: #f00;
  3.     }
And then inserting any undeclared property within this class. Would this get around the problem or is it unreliable?
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,830
#4: Aug 6 '07

re: Navcontainer and IE6 problem


That is the only way IE6 understands hover.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#5: Aug 6 '07

re: Navcontainer and IE6 problem


Quote:

Originally Posted by drhowarddrfine

IE6 does not work with hover on any element but <a>.

Ohhhhhhhhhhhhh good. *sigh*
Reply