Subscribe to this list via RSS Blog posts tagged in input
Faking a placeholder Attribute for an Editable div, and Some CSS Tricks HTML input elements have a placeholder attribute which you can use to show a bit of text to prompt the end user. Although you can make an editable div by using the contenteditable attribute, it will not support the placeholder attribute. I needed to do both, so I ended up reinventing the placeholder attribute for editable divs. Here's how I did it. I wanted the "placeholder" in the editable div to behave as much as possible like a "real" placeholder in an input element. So I started by making...
  • Page :
  • 1

Check out more tips and tricks in this development video: