471,610 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

How to change the font size of a input box

22
have an order form that is created using php, the text field defaults to normal sized font, how can we change the font to a smaller size????

[php]

echo "<td><input size='45' name='Description' id='Description".$item_info['item']."' value=\"" . $item_info['desc']. "\" readonly='readonly' type='text'></td>" ;

[/php]
Oct 3 '07 #1
1 40615
Atli
5,058 Expert 4TB
Hi.

That would be more of a HTML / CSS problem, so I will be moving it over there.
I've also change the thread title. Please try to give your threads meaningful names that describes the topic of the thread. It helps us help you!

The solution, however, would be to:
1. Add a 'style' property to the <input> tag, specifying the font-size:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" style="font-size: 10px;" />
  2.  
2. Create a CSS class and set the 'class' property of the <input> tag:
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2. .InputClass {
  3.   font-size: 10px;
  4. }
  5. </style>
  6. <input type="text" class="InputClass" />
  7.  
Oct 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by kmunderwood | last post: by
16 posts views Thread by Coder Droid | last post: by
15 posts views Thread by lharby | last post: by
2 posts views Thread by Bjoern | last post: by
5 posts views Thread by VB Programmer | last post: by
2 posts views Thread by Dave | last post: by
3 posts views Thread by # Cyrille37 # | last post: by
5 posts views Thread by _Who | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.