Answers for "placeholder css code"

8

html select placeholder

Placeholder attribute does not exist for the <select> tag.
But there are some ways to make a placeholder for the select box.
The easiest way of making a placeholder for the <select> element is using the disabled and selected attributes with the HTML5 hidden global attribute.
  
<select name="monthname" required>
  <option value="" selected disabled hidden>Select Month</option>
  <option value="Jan">January</option>
  <option value="Feb">February</option>
  <option value="Mar">March</option>
  <option value="Apr">April</option>
  <option value="May">May</option>
  <option value="Jun">June</option>
  <option value="Jul">July</option>
  <option value="Aug">August</option>
  <option value="Sep">September</option>
  <option value="Oct">October</option>
  <option value="Nov">November</option>
  <option value="Dec">December</option>
</select>
Posted by: Guest on April-22-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
4

placeholder css

::-webkit-input-placeholder {color: pink;} /* Chrome/Opera/Safari */
::-moz-placeholder { color: pink;} /* Firefox 19+ */
:-ms-input-placeholder { color: pink;} /* IE 10+ */
:-moz-placeholder {color: pink;}  /* Firefox 18- */
Posted by: Guest on October-09-2020
0

css style placeholder

<!DOCTYPE html>
<html lang="en">
   <head>
      <title>Placeholder - Style</title>
      <style>
         ::placeholder {
            color: green;
         }

         .force-opaque::placeholder {
            opacity: 1;
         }
      </style>
   </head>
   <body>
      <input placeholder="Default opacity..." />
      <input placeholder="Full opacity..." class="force-opaque" />
   </body>
</html>
Posted by: Guest on February-22-2021
-1

css style placeholder

::placeholder {
  /*styles here*/
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  /*styles here*/
}
Posted by: Guest on June-08-2020

Browse Popular Code Answers by Language