Click to See Complete Forum and Search --> : input borders for text boxes


moondance
08-21-2003, 05:38 AM
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.

Charles
08-21-2003, 05:43 AM
The easiest way is to use a BUTTON (http://www.w3.org/TR/html4/interact/forms.html#edef-BUTTON) element for your submit button.

moondance
08-21-2003, 05:53 AM
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">

Charles
08-21-2003, 05:56 AM
<button type="submit"><img src = "graphics/btn1.jpg" name = "submit" alt = "Log In"></button>

Or you can play around with ids and classes.

moondance
08-21-2003, 05:59 AM
How would you add an id to it?

Charles
08-21-2003, 06:05 AM
<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">

moondance
08-21-2003, 06:09 AM
Great - the second one worked fine.

Thanks for your help and the quick replies. ;)

ps. Whats an undermensch?

Charles
08-21-2003, 06:39 AM
Originally posted by moondance
Whats an undermensch? Nietzsche wrote of the ubermensch, the over man, man perfected.

moondance
08-22-2003, 07:37 AM
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".

:confused:

moondance
08-22-2003, 08:00 AM
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;">

:)