CSS within a Form query

K

KiwiBrian

I have the following entry in a form.

<div style="padding: 5px;">1 refill
<input value=" Order " name="B1" type="submit">
</div>

How can I add/apply a hover style so that the word "Order" will change from
green to red on hover?

Thaks for any help
I am reasonably familiar with HTML and CSS.
Brian Tozer
 
J

Jonathan N. Little

KiwiBrian said:
I have the following entry in a form.

<div style="padding: 5px;">1 refill
<input value=" Order " name="B1" type="submit">
</div>

How can I add/apply a hover style so that the word "Order" will change from
green to red on hover?

Thaks for any help
I am reasonably familiar with HTML and CSS.
Brian Tozer


<style type="text/css">
..dynamic { color: green; }
..dynamic:hover { color: red; }
</style>

<div style="padding: 5px;">1 refill
<input class="dynamic" value=" Order " name="B1" type="submit">
</div>

Of course only works in modern web browsers, for IE<=6.x you will need a
JavaScript solution
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top