CSS Dropdown error IE6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jollywg
    New Member
    • Mar 2008
    • 158

    CSS Dropdown error IE6

    Hi I'm using CSS for a drop down menu, and it works in firefox, opera, and i think ie7. The reason i say "i think" is because i'm now testing the page in ie6 and it doesn't work, but it used to in ie7. I've posted the CSS below.

    Code:
    <style type = "text/css">
    
    #menu ul .top a {text-decoration: none; color: white;}
    							
    #menu ul .top a:hover {color: rgb(255,100,0);}	
    			
    #menu ul .top a 	{font-weight: bolder; font-size: 16px; font-family: arial; sans-serif; text-align: left; background-color: black; margin-left: .2em;}		
    
    #menucontainer{margin-right: auto; margin-left: auto; width: 48em;}
    
    #menu {position: absolute; display: block; width: 48em;z-index: 1;}
    
    #menu ul .item	{display: none; text-align: center;font-size: 12px;}
    
    #menu ul:hover .item a {color:white; text-decoration: none;font-weight: bolder;}
    
    #menu ul:hover .item a:hover {color:rgb(255,100,0);}
    
    #menu ul	{color: white; width: auto; text-align: left; float:left;	list-style:none;}
    
    #menu ul:hover .item	{display: block; padding-top: .33em; font-family: arial, sans-serif; background-color: black;}
    
    .clear{clear:both;height:10px;}			
    						
    #menucontainer {margin-left: auto; margin-right: auto; padding-right: 5em;}
    
    </style>
    Any Ideas would be greatly appreciated.

    Thank you!
    Matt
    Last edited by Markus; Oct 26 '08, 03:33 PM. Reason: added # tags
  • David Laakso
    Recognized Expert Contributor
    • Aug 2008
    • 397

    #2
    Insufficient information. Please provide a clickable link to the page in question. Anyone can then view the document markup and open the CSS file.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Use code tags when posting code, as well.

      Markus.

      Comment

      • Jollywg
        New Member
        • Mar 2008
        • 158

        #4
        Originally posted by David Laakso
        Insufficient information. Please provide a clickable link to the page in question. Anyone can then view the document markup and open the CSS file.
        I need some help with this. I'm rather new to web design obviously. where can i go to get a free site to load this into?

        Thanks

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Google 'free web hosting'. I would give you some links but I don't know if it's against guidelines.

          Comment

          • David Laakso
            Recognized Expert Contributor
            • Aug 2008
            • 397

            #6
            I need some help with this. I'm rather new to web design obviously. where can i go to get a free site to load this into?
            Trust me-- even though this is a personal opinion: seeking free web hosting is an invitation for disaster. Web hosting is relatively inexpensive. It is imperative you go with a host/sever that is reputable. I'll let others point you to same.

            Comment

            • Jollywg
              New Member
              • Mar 2008
              • 158

              #7
              Originally posted by David Laakso
              Trust me-- even though this is a personal opinion: seeking free web hosting is an invitation for disaster. Web hosting is relatively inexpensive. It is imperative you go with a host/sever that is reputable. I'll let others point you to same.
              I will actually buy a site when i get my webpage done, i just need something so that everyone can see the big picture if(when) i need help.

              Comment

              • Markus
                Recognized Expert Expert
                • Jun 2007
                • 6092

                #8
                Originally posted by Jollywg
                I will actually buy a site when i get my webpage done, i just need something so that everyone can see the big picture if(when) i need help.
                Post #5

                Comment

                • JamieHowarth0
                  Recognized Expert Contributor
                  • May 2007
                  • 537

                  #9
                  Hi there,

                  As much as we'd ideally like a link so we can see your page in action, I think I have an idea why your hovers aren't working.
                  Internet Explorer 6 has two modes - "strict" and "quirks" mode. When in quirks mode, using the CSS :hover selector won't work on anything except <a> tags.

                  There is a workaround to this, however - I suggest you download the HTC app from here. When you specify this on ul elements using behavior:url(cs shover.htc), hovers will magically work in quirks mode!
                  Also, because the CSS property behavior is IE-specific, it won't break your other pages.
                  Ideally you'd use this code to implement it:
                  Code:
                  <!--[if IE 6]>
                  <style type="text/css">
                  <!--
                  ul {behaviour:url(csshover.htc);}
                  --></style><![endif]-->
                  This way, the behavior only gets applied on IE6 (note the use of conditional comments). IE7 does not suffer this problem.

                  Hope this helps.

                  codegecko

                  Comment

                  Working...