Text indent is not working in ie7

前端 未结 14 1762
礼貌的吻别
礼貌的吻别 2021-01-31 09:43

I am working on a website and on the top navigation bar there is a search box, I applied the following css on the search submit button

#submit {
   background:          


        
相关标签:
14条回答
  • 2021-01-31 10:32

    I tried all of the above with no success. I had to add a float:left before it picked up the text indent. IE7 is crazy, and by crazy I mean awful.

    0 讨论(0)
  • 2021-01-31 10:32

    Here is some CSS I'm using that works for me in IE and doesn't rely on text-indent

    .sprite {
        width:100%;
        height:0px;
        padding-top:38px;
        overflow:hidden;
        background-repeat:no-repeat;
        position:relative;
        float:left;
        display:block;
        font-size:0px;
        line-height:0px;
    }
    .sprite.twitter {
        background-image:url(/images/social/twitter-sprite.png);
        margin-top:8px;
        background-position: 4px 0px;
    }
    #social-links a:hover .sprite.twitter {
        background-position: 4px -38px;
    }
    
    0 讨论(0)
提交回复
热议问题