Gary
Premium Member
Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
|
Good idea
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by glb
Placeholder removes the 'Enter your Postcode' text from the box.
Yup, but it's a HTML 5 tag so only a handful of browsers will support it. Better off using Javascript or a JQuery Watermark plugin etc
|
Gary
Premium Member
Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
|
Prob easier to leave it as is. Does the job and dnt effect it's workings.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Placeholder works on most browsers now? It's just a bit neater but if it isn't working for you then don't spend too much time on it...
|
Gary
Premium Member
Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
|
Ahh fair enough.
Any idea how to make the text input box clear all the text once it's clicked in?
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Use this: http://plugins.jquery.com/project/placeholder
I'd suggest you have a bit of a read about jQuery first as it's a Javascript library that's very simple to use, but you just need to know what you're doing first. It's much easier that Google Maps so you'll have no issues!
|
Gary
Premium Member
Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
|
Cheers i'll have a look a that.
Might just leave it as is. IF it aint broke dont fix it etc etc
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Yep totally. I guess what you could do is this though:
<label class="inputLabel" for="postcode">Please Enter Your Postocode:</label><input type="text" name="postcode" />
Which will put a label next to your postcode input, and as it has the class 'inputLable' it will show the same formatting as the rest of your site's text inputs when you include the CSS file in the head by putting this in there:
<link rel="stylesheet" type="text/css" href="includes/templates/black_pure_free/css/stylesheet.css" />
|