View Full Version : Text Boxes

10-25-2005, 03:47 PM
I want the text in the text box to be highlighted when they tab to it. is there a way to do it or do they have to highlight and then start typing. And how do you center buttons? JF

10-26-2005, 06:52 AM
The easiest way is to use CSS (pseudo class) to apply the highlighting whenever the user sets focus to the form element:

<style type="text/css">
input:focus, textarea:focus{
background-color: lightyellow;

This technique currently does not work in IE6, however.

10-26-2005, 03:42 PM
If I have multiple text boxs inserted on page and I put this on the top of the page will all the text boxs will be highlighted when the change their focus to them?