www.webdeveloper.com
Results 1 to 10 of 10

Thread: input borders for text boxes

  1. #1
    Join Date
    Mar 2003
    Posts
    191

    input borders for text boxes

    i can use the code:

    input {background-color: #FFFFFF; border: 1px #000000 solid}

    and this will put a black border around my textboxes and the submit button. Is there anyway i can just have the border around the textboxes alone?

    I've searched the web and seen the code:

    input.text {background-color: #FFFFFF; border: 1px #000000 solid}

    but then this doesn't have any effect at all.

    Thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    The easiest way is to use a BUTTON element for your submit button.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Mar 2003
    Posts
    191
    that would work, but i'm using my own image for a submit button:

    <input type = "image" src = "graphics/btn1.jpg" name = "submit" alt = "Log In">

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    <button type="submit"><img src = "graphics/btn1.jpg" name = "submit" alt = "Log In"></button>

    Or you can play around with ids and classes.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Mar 2003
    Posts
    191
    How would you add an id to it?

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    <input type="image" src="graphics/btn1.jpg" name="submit" alt="Log In" id="submit">

    or

    <iinput type="image" src="graphics/btn1.jpg" name="submit" alt="Log In" style="border:0px">
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  7. #7
    Join Date
    Mar 2003
    Posts
    191
    Great - the second one worked fine.

    Thanks for your help and the quick replies.

    ps. Whats an undermensch?

  8. #8
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Originally posted by moondance
    Whats an undermensch?
    Nietzsche wrote of the ubermensch, the over man, man perfected.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  9. #9
    Join Date
    Mar 2003
    Posts
    191
    hmmm i've got myself stumped again.

    how can i use the method above for a reset button?

    For some reason, when using value="submit" (as in the above example) it works fine, but it won't work with value ="reset".


  10. #10
    Join Date
    Mar 2003
    Posts
    191
    no need for reply - i just worked it out:

    <input type = "reset" name = Reset" value="" style="background-image: url(clear_btn); border: 0px; width: 115px; height: 35px; background-color: transparent;">


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles