Text input placeholders not displaying in IE and Firefox

后端 未结 4 2106
予麋鹿
予麋鹿 2021-02-07 04:55

My text input placeholders refuse to display in IE and Firefox despite having used the -moz-placeholder attribute. This can be viewed on the contact page here if you are using F

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-07 05:16

    It seems -moz-box-sizing is causing your issue.

    input[type="email"], input[type="password"], input[type="text"] 
    {
        -moz-box-sizing: border-box; // remove this line
        height: 25px;
        margin-bottom: 30px;
        padding: 20px;
    }
    

    Removing the line will play havoc with your input sizes so you can add a general rule for box-sizing to your CSS.

    *, *:before, *:after {
        -moz-box-sizing: border-box;
    }
    

提交回复
热议问题