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?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>Don't forget the border color...
<!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 (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->)" />
<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>
or just the CSS...
input {
font-size: 9pt;
border: #000000 solid 1px;
}
Let me know if it works for you. Here's the screenshot...The border will default to black -- the css I posted is valid...Originally posted by pyro
The border will default to black
I've learned something new today. That's a good thing, eh?
text, select
{ font-size:9pt;
border:solid 1px;
}
Is there a list somewhere of all the elements that CSS affects?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>Don't forget the border color...
<!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 (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->)" />
<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>
or just the CSS...
input {
font-size: 9pt;
border: #000000 solid 1px;
}
Let me know if it works for you. Here's the screenshot...The border will default to black -- the css I posted is valid...Originally posted by pyro
The border will default to black
I've learned something new today. That's a good thing, eh?