css input placeholder padding left code example

Example 1: placeholder color in css

/* do not group these rules */
*::-webkit-input-placeholder {
    color: red;
}
*:-moz-placeholder {
    /* FF 4-18 */
    color: red;
    opacity: 1;
}
*::-moz-placeholder {
    /* FF 19+ */
    color: red;
    opacity: 1;
}
*:-ms-input-placeholder {
    /* IE 10+ */
    color: red;
}
*::-ms-input-placeholder {
    /* Microsoft Edge */
    color: red;
}
*::placeholder {
    /* modern browser */
    color: red;
}

Example 2: how to margin placeholdr text

input[type="text"]::placeholder {  
                  
                /* Firefox, Chrome, Opera */ 
                padding-left: 10px; 
            } 
/*Must include type="text" in HTML*/

Tags:

Html Example