/    Sign up×
Community /Pin to ProfileBookmark

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.

to post a comment
CSS

9 Comments(s)

Copy linkTweet thisAlerts:
@CharlesAug 21.2003 — [font=georgia]The easiest way is to use a [url=http://www.w3.org/TR/html4/interact/forms.html#edef-BUTTON]BUTTON[/url] element for your submit button.[/font]
Copy linkTweet thisAlerts:
@moondanceauthorAug 21.2003 — 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">
Copy linkTweet thisAlerts:
@CharlesAug 21.2003 — [font=monospace]<button type="submit"><img src = "graphics/btn1.jpg" name = "submit" alt = "Log In"></button>[/font]

[font=georgia]Or you can play around with ids and classes.[/font]
Copy linkTweet thisAlerts:
@moondanceauthorAug 21.2003 — How would you add an id to it?
Copy linkTweet thisAlerts:
@CharlesAug 21.2003 — [font=monospace]<input type="image" src="graphics/btn1.jpg" name="submit" alt="Log In" id="submit">

[font=georgia][i]or[/i][/font]

<iinput type="image" src="graphics/btn1.jpg" name="submit" alt="Log In" style="border:0px">[/font]
Copy linkTweet thisAlerts:
@moondanceauthorAug 21.2003 — Great - the second one worked fine.

Thanks for your help and the quick replies. ?

ps. Whats an undermensch?
Copy linkTweet thisAlerts:
@CharlesAug 21.2003 — [i]Originally posted by moondance [/i]

[B]Whats an undermensch? [/B][/QUOTE]
[font=georgia]Nietzsche wrote of the ubermensch, the over man, man perfected.[/font]
Copy linkTweet thisAlerts:
@moondanceauthorAug 22.2003 — 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".

?
Copy linkTweet thisAlerts:
@moondanceauthorAug 22.2003 — 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;">

?
×

Success!

Help @moondance spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...