PDA

View Full Version : Formatting text boxes



helpplease
Jan 31st, 2003, 10:04 AM
How can you format the text in a text box, such as font, font-size, bold, etc.?

meow
Jan 31st, 2003, 10:18 AM
Meaning a textarea? The only way you can do it is with CSS. Browser support may vary.



textarea { font-family: Georgia, serif; font-weight: bold; color: red; background: #aaa }


http://www.htmlhelp.com/reference/css/font/
http://www.htmlhelp.com/reference/css/style-html.html

JustAsking
Jan 31st, 2003, 12:25 PM
Or if you mean an input box in a form you could do it like this:



<html>
<head>
<style>
<!--
input.box {font-family: arial; font-size: 14px; font-weight: bold;}
//-->
</style>
</head>
<body>

<form>
<input class="box" type="text" name="name" size="20" />
<input type="button" value="Submit" />
</form>

</body>
</html>

helpplease
Jan 31st, 2003, 08:20 PM
Thanks, I'll try it out!