What i am trying to do is fake a placeholder for two reasons, 1) I want the place holder to stay visable on normal input[type=text] and 2) I wanted to try and give some support to older/non-html5 browsers.
The thing is i'm having two problems: 1) Only working in chrome don't know why lol and 2) On the textarea it makes sense for it to go away but i can't figure out how to get rid of it when user has inputted text into the textarea field
What @Odd_E said - placeholder="placeholder text here" works in browsers that support it. That being said I would also recommend using label's from an accessibility point of view and for older browser support.
Please take a look at this pen (sorry i use sass+compass):
http://codepen.io/__anon__/pen/4332/3
What i am trying to do is fake a placeholder for two reasons, 1) I want the place holder to stay visable on normal input[type=text] and 2) I wanted to try and give some support to older/non-html5 browsers.
The thing is i'm having two problems:
1) Only working in chrome don't know why lol
and
2) On the textarea it makes sense for it to go away but i can't figure out how to get rid of it when user has inputted text into the textarea field
Does anyone have any ideas please?
Thank you long time lol
Phil
**Edited to tidy code up slightly**
And the test case: http://www.red-team-design.com/wp-content/uploads/2012/06/generated-content-on-replaced-elements-test.html
thank you