How do I get placeholder text in firefox and other browsers that don't support the html5 tag option?


Tags: html,css,firefox,internet-explorer-8

Problem :

This works in Chrome and any other browser that supports placeholder text in HTML5

<input id="name" name="name"  type="text" placeholder="Please enter your name..." required /> <br />

But, it doesn't work in 3.5 and earlier of Firefox, and obviously IE8, and possibly other browsers.

How do I achieve the same thing (preferably in HTML/CSS - if not I am open to suggestions), to support all the older browsers? If not every single browser, at least Firefox and IE.

Safari and Chrome already support it (or the latest versions anyway).

Thanks.



Solution :

By the way...if anyone is interested...I found a nice elegant solution that is a jQuery plugin that is SOOO nice.

It literally is one line of jQuery, a minified js plugin, along with a simple class name on the input.

http://labs.thesedays.com/projects/jquery/clearfield/

It's the most beautiful thing I have discovered, next to 'Placeholder' in html.


    CSS Howto..

    jQuery Slideshow in Chrome, Firefox, and Safari

    ASP.NET Gridview - How do I change the color properties vertically?

    How to apply multiple transforms in CSS?

    How to change the background color of a span/div WITHOUT CSS [closed]

    How to add class to column of grid with angular-ui-grid?

    responsive html shows a tablet css design instead of the mobile when on my iphone 4s?

    How do I lock a sidebar to the height of a window even when a user scrolls?

    how can i connect my css to my JSP files stored in the WEB-INF folder? Websphere/JSP

    How to implement this kind of blur effect?

    How to add box-shadow to a CSS div with display:table-row? [duplicate]

    Showing play button and time on each image

    How would I go about editing the polar clock counter clockwise?

    JQuery, fade out table row and contents (on scroll) in ratio to how much the row is hidden by containing div

    How to get a CSS selector using Selenium WebDriver?

    When using WebFont loader, how to hardcode the css?

    How to add a new CSS class to a Link Badge if the value is 0?

    How to make two buttons in column?

    How to make a content property in css use php

    How to do CSS nth-child in span tags?

    How to Get Fixed Children to Play Nicely with their Parents

    How to hide a segment of my website using PHP

    How do I use css transitions to scale an image and move it at the same time?

    How to only underline text element inside an element in CSS?

    How to call JavaScript on change of CSS

    How to sprite body background in CSS

    How to place content below a fixed image?

    How to Stop Overriding of Bootstrap Css Styles

    How can I use CSS to make a multi-select box but have the label appear on top instead of to the left?

    How to create invoice / money reciept with html [closed]

    css/jquery - how to hide last row of floated elements if not even