padding is not working in Safari and IE in select list

后端 未结 7 615
情书的邮戳
情书的邮戳 2020-11-27 20:32

Does any one know why my Safari is not taking padding in select lists? It\'s working fine in FF please tell me what to do. is there any issue with the doctype?

code:

相关标签:
7条回答
  • 2020-11-27 20:59

    I have just been researching the same problem. The answer I have come up with is to set the border properties to be the padding, but transparent. For example

    Original:

    select.paddedBox {
        padding-left:15px;
    }
    

    Becomes:

    select.paddedBox {
        border-bottom:solid 0px transparent;
        border-left:solid 15px transparent;
        border-right:solid 0px transparent;
        border-top:solid 0px transparent;
    }
    

    If you still want to use a border, then you can use the outline property to set it

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