Answers for "placeholder selecter"

9

placeholder select html

<!DOCTYPE html>
<head>
</head>
<body>
  <select name="food">
    <!-- The following line makes a placeholder -->
    <option value="" disabled selected hidden>select food</option>
    <option value="apple">apple</option>
    <option value="melon">melon</option>
  </select>
</body>
Posted by: Guest on December-21-2020
32

css style placeholder

input::-webkit-input-placeholder {/* Chrome/Opera/Safari/Edge */
	/*styles here*/
}

input::-ms-input-placeholder { /* Microsoft Edge */
   /*styles here*/
}

input:-ms-input-placeholder {/* IE 10+ */
	/*styles here*/
}

input::-moz-placeholder {/* Firefox 19+ */
	opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/
	/*styles here*/
}

input:-moz-placeholder {/* Firefox 18- */
	opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/
	/*styles here*/
}

input::placeholder {
	/*styles here*/
}
Posted by: Guest on February-25-2020
0

html select placeholder

//angular
//<select> tag doesn't have any placeholder attribute.
//But you can make a placeholder by making
//your first option disabled and selected.
//Maybe you would want that option to be hidden,
//just add hidden
//in Angular you need to add value="undefined"
<select name="gender" required>
  <option value="undefined" selected disabled hidden>Select a Gender</option>
  <option value="Female">Female</option>
  <option value="Male">Male</option>
  <option value="Intersex">Intersex</option>
  <option value="Trans">Trans</option>
  <option value="Non-Conforming">Non-Conforming</option>
  <option value="Personal">Personal</option>
  <option value="Eunuch">Eunuch</option>
</select>
Posted by: Guest on December-28-2020
0

html css placeholder input font-size

Placeholder text will automatically inherit the font family and font size of the regular input text, but you may be in a situation where you want to change the placeholder text color. You can accomplish that with the ::placeholder pseudo-element.
Posted by: Guest on May-18-2020

Browse Popular Code Answers by Language