css input code code example

Example 1: how to write css for input type text

/* For Example, If we want to change css of "text" type
from <input> we do this:*/

input[type=text] {
    /* Your Code Here */ 
}

Example 2: css set styles for input text

input[type="text"] {  font-size: 0.9em;  padding-top: 0.35rem;}

Example 3: style input field

#userInfoForm {
    width: 80%;
    padding: 5px 5px;
    margin: 0 auto;
    background: #FF6700;
    border-radius: 25px; 
}

#userInfoForm input {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 25px;
}

Tags:

Html Example