Css attribute selector for inputs not working in IE8

后端 未结 3 1849
北海茫月
北海茫月 2021-01-20 03:16

I have the following css code working in Firefox/Chrome but not in IE8

input[type=\'text\']
{
    float: right;
    width: 170px;
}

If I re

相关标签:
3条回答
  • 2021-01-20 03:36

    IE7 and IE8 support attribute selectors only if a !DOCTYPE is specified. Attribute selection is NOT supported in IE6 and lower.

    0 讨论(0)
  • 2021-01-20 03:37

    Go to this Question

    Used to jquery

    As like this

    $('input[type="text"]').css({float: 'right'});
    
    0 讨论(0)
  • 2021-01-20 03:42

    According to http://reference.sitepoint.com/css/css3attributeselectors#compatibilitysection attribute selectors are quite buggy in IE8

    You might want to try just using classes on those input fields you want to select

    0 讨论(0)
提交回复
热议问题