making an image part of the Radio button

Discussion in 'HTML' started by Summercool, Nov 22, 2007.

  1. Summercool

    Summercool Guest

    It seems like there are cases in which when you click on an image next
    to the radio button, the radio button is selected...

    must it be done by Javascript? can't it be done alone by HTML itself?
    Summercool, Nov 22, 2007
    #1
    1. Advertising

  2. Summercool

    Scott Bryce Guest

    Scott Bryce, Nov 22, 2007
    #2
    1. Advertising

  3. Scott Bryce wrote:
    > Summercool wrote:
    >> It seems like there are cases in which when you click on an image next
    >> to the radio button, the radio button is selected...
    >>
    >> must it be done by Javascript? can't it be done alone by HTML itself?

    >
    >
    > http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL
    >


    Illustrative example:

    <fieldset>
    <legend>Your Judgment:</legend>

    <input type="radio" name="fate" id="fatelife" value="life">
    <label for="fatelife">
    <img src="thumbsup.gif" alt="thumbs up">
    </label>

    <input type="radio" name="fate" id="fatedeath" value="death">
    <label for="fatedeath">
    <img src="thumbsdown.gif" alt="thumbs down">
    </label>

    </fieldset>

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 22, 2007
    #3
  4. Summercool

    Summercool Guest

    CSS color conditional on content

    for CSS, is it possible to say, if the content in the div or span is
    0, show the "0" in red, and if it is a "1", show it in green? I can
    use PHP or any script to do it, but it probably is quite handy to let
    CSS handle the formatting style without needing server support.
    Summercool, Nov 23, 2007
    #4
    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. Mark
    Replies:
    24
    Views:
    1,175
    Ed Jay
    Jan 7, 2006
  2. Scott D Johnson
    Replies:
    1
    Views:
    1,064
    Scott D Johnson
    Sep 27, 2006
  3. Dan
    Replies:
    0
    Views:
    927
  4. Hiten
    Replies:
    1
    Views:
    620
    Vidar Petursson
    May 26, 2004
  5. Replies:
    2
    Views:
    122
Loading...

Share This Page