/    Sign up×
Community /Pin to ProfileBookmark

textbox formatting

If I want all the text boxes and selects on my form to appear with a solid border and a specific height, why doesn’t this work, and what WOULD work.

text, select
{ font-size:9pt;
border:solid 1px;
}

Is there a list somewhere of all the elements that CSS affects?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@pyroSep 05.2003 — CSS can affect any element on the page...

<style type="text/css">
textarea, select, .textbox {
font-size: 9pt; /*you really shoudn't use pt fonts...*/
border: 1px solid;
}
</style>
</head>
<body>
<form action="" method="post">
<p>
<select>
<option value="test">test</option>
</select>
<textarea rows="5" cols="50"></textarea>
<input type="text" class="textbox">
</p>
</form>
Copy linkTweet thisAlerts:
@JoshSep 05.2003 — Don't forget the border color...
[code=php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Nicodemas Form</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="author" content="Joshua J Mallory ([email protected])" />
<style type="text/css">
input {
font-size: 9pt;
border: #000000 solid 1px;
}
</style>
</head>
<body>
<form action="">
<input type="text" /> <input type="submit" class="submit" />
</form>
</body>
</html>
[/code]

or just the CSS...
[code=php]
input {
font-size: 9pt;
border: #000000 solid 1px;
}
[/code]

Let me know if it works for you. Here's the screenshot...

[upl-file uuid=d013e40c-c85b-4f98-aab1-f559c10e90c0 size=9kB]nicodemas.png[/upl-file]
Copy linkTweet thisAlerts:
@pyroSep 05.2003 — The border will default to black -- the css I posted is valid...
Copy linkTweet thisAlerts:
@JoshSep 05.2003 — [i]Originally posted by pyro [/i]

[B]The border will default to black[/B][/QUOTE]

I've learned something new today. ?
Copy linkTweet thisAlerts:
@pyroSep 05.2003 — That's a good thing, eh? ?
×

Success!

Help @Nicodemas 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.25,
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,
)...