English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm trying to create a similar effect to what is found on the top of Virb.com where a text form changes its style (background, font coloring) when somebody selects it. I can style the form manually using CSS, but I need a way to swap styles when a user selects it. Bonus points if anybody knows how to remove the text when somebody selects on it, but replace it if they don't fill in the field. Again, a similar effect to what is displayed on the site already.

Thanks in advance.

2007-06-19 03:54:28 · 2 answers · asked by MrSparkle 2 in Computers & Internet Programming & Design

2 answers

The last one I used was a java script which changed the style on mouse over or on click. I dont think straight CSS will let you do this without a script. I download one from Matts Script archive I think.

I take that back I used this one
http://alistapart.com/stories/alternate/

Here is another article on a different method
http://developer.mozilla.org/en/docs/DOM:style
tl

2007-06-19 04:09:16 · answer #1 · answered by Tracy L 7 · 0 0

on your css you utilize 'style' and in the html you're referencing it as form1 so the css won't stick to. attempt changing them to tournament one yet another like this. .style { enter:concentration { historic past-shade:#FF6666 } } html physique