I have the following input field
<input type="text" id="search-box" placeholder="input the name" />
the placeholder text sets the default value of the field which is "input the name". If you click the field the text disappears so that you can type the name in the field.
the placeholder text is shown in Chrome but not in Firefox, how to fix this firefox problem?? (I am using firefox 3.6)
If you have an input in your form and placeholder is not showing because a white space at the beginning, this may be caused for you "value" attribute. In case you are using variables to fill the value of an input check that there are no white spaces between the commas and the variables.
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format). The short hint is displayed in the input field before the user enters a value.
placeholder is a HTML5 attribute that isn't supported in Firefox 3.6
It is supported in Firefox 4.0 and above: https://developer.mozilla.org/en/CSS/%3A-moz-placeholder
I believe the placeholder attribute is WebKit-only (Safari and Chrome). Please see this link for how to make it work in the rest of browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With