CSS within a Form query

Discussion in 'HTML' started by KiwiBrian, May 14, 2006.

  1. KiwiBrian

    KiwiBrian Guest

    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
     
    KiwiBrian, May 14, 2006
    #1
    1. Advertising

  2. KiwiBrian wrote:
    > 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


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, May 15, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learner
    Replies:
    1
    Views:
    998
    Marina Levit [MVP]
    Jan 30, 2006
  2. Anonymous
    Replies:
    0
    Views:
    1,492
    Anonymous
    Oct 13, 2005
  3. Dave Smithz
    Replies:
    3
    Views:
    34,666
    mokker
    Oct 30, 2009
  4. David Gordon

    xpath query query

    David Gordon, May 18, 2005, in forum: XML
    Replies:
    2
    Views:
    801
    David Gordon
    May 18, 2005
  5. Eric Nelson
    Replies:
    5
    Views:
    1,538
    Alexey Smirnov
    Feb 4, 2009
Loading...

Share This Page