SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hover state is not working in IE6

    Hi,

    Please have a look at this page, HTML code and CSS is given below and the images are attached. The menu is working fine in all browsers except IE6.

    I used the background image on hover state.

    Please help me how can I make everything work in IE6 too?

    HTML code:
    <div id="wrapper">
    <div id="top-bg"></div>
    <div id="middle-bg">
    <div id="logo"></div>
    <div id="navigation">
    <ul>
    <li><a href="#"><span>Link 1</span></a></li>
    <li><a href="#"><span>Link 2</span></a></li>
    <li><a href="#"><span>Link 3</span></a></li>
    <li><a href="#"><span>Link 4</span></a></li>
    <li><a href="#"><span>Link 5</span></a></li>
    </ul><br style="clear: left" />
    </div>
    <div id="main-img"></div>
    <div id="img-btn1"></div>
    <div id="img-btn2"></div>
    </div>
    <div id="bottom-bg"></div>
    </div>

    CSS:
    body {
    background: #e1dfd8;
    margin: 0;
    padding: 0;
    }

    #wrapper {
    margin: 12px auto;
    padding: 0;
    width: 859px;
    }

    #navigation{
    margin: 0;
    padding: 0;
    }

    #navigation ul{
    margin: 0;
    float: left;
    padding: 0;
    font: bold 15px Arial;
    background: #c00000 url(../images/a.gif) repeat-x;
    width: 859px;
    }

    #navigation ul li{
    display: inline;
    }

    #navigation ul li a{
    float: left;
    color: white;
    font-weight: bold;
    padding: 5px 30px 0px 25px;
    text-decoration: none;
    line-height: 30px;
    }

    #navigation ul li a:visited{
    color: white;
    }


    #navigation ul li a:hover, #navigation ul li a#selected{
    color: lightyellow;
    background: url(../images/b.gif)repeat-x;
    height: 30px;
    }

    #navigation a span {
    display:block;}

    #navigation a:hover span {
    background: url(../images/pointer.gif) bottom no-repeat;
    }


    Thanks in advance.
    Attached Images Attached Images

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, IE will ignore the background if there isn't a space between the ) and the next word
    Code:
    background: url(../images/b.gif)repeat-x;
    Add a space b etween ) and repeat-x. It should look like..

    Code:
    background: url(../images/b.gif) repeat-x;
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot Ryan.

  4. #4
    Error 404: Life not found silver trophybronze trophy
    Join Date
    Dec 2007
    Location
    UK Nr Manchester
    Posts
    3,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Hi, IE will ignore the background if there isn't a space between the ) and the next word
    Who knew..!

    ONly 10% of people still clinging on to IE6 but now MS are pulling support for it we can expect that figure to start to go down quite fast. Good riddance to the bane of my life.
    It's 530 people, but do you really get it?
    ImgWebDesign - Web design in Buxton, High Peak, Derbyshire UK.

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ashish.design View Post
    thanks a lot Ryan.
    You're welcome.
    Quote Originally Posted by JJMcClure View Post
    Who knew..!

    ONly 10% of people still clinging on to IE6 but now MS are pulling support for it we can expect that figure to start to go down quite fast. Good riddance to the bane of my life.
    It's not just IE6. IE7/8 will also ignore it
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •