HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Setting the font size for a button value?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
gordc



Joined: 21 Oct 2009
Posts: 3

PostPosted: Wed Oct 21, 2009 4:03 pm     Setting the font size for a button value? Reply with quote

I cannot find a way to increase the font size of a button value. Can this be done?
gordc.
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

PostPosted: Wed Oct 21, 2009 6:25 pm     Reply with quote

Post your code and any CSS you are using for styling the button, if any.
gordc



Joined: 21 Oct 2009
Posts: 3

PostPosted: Thu Oct 22, 2009 5:12 am     Reply with quote

Below is a partial HTML listing for an array of buttons (as in a calculator pad).
Code follows:-
_______________________________________
<BR><BR><p align="center" ><font size="7">
<input type="button" name=b7 value="7" onclick=keyclick("7")>
<input type="button" name=b8 value="8" onclick=keyclick("8")>
<input type="button" name=b9 value="9" onclick=keyclick("9")>
________________________________________
What I need to do is to increase the font size of the value character. The <font size> command has no effect. I have not attempted to use a style because I can't see how to apply this.
Thanks
Gord
gordc



Joined: 21 Oct 2009
Posts: 3

PostPosted: Thu Oct 22, 2009 10:12 am     Reply with quote

A google search provided a solution.
see http://bytes.com/topic/html-css/answers/98059-relative-sizing-button-text

//This code will set the value text to yellow, 18pt.
<style type="text/css">
.mypad{background-color: Yellow; font-size : 18pt ;width:30;} </style>
<input type=button class=mypad value="7">

Thanks for help
Gord
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

PostPosted: Sun Oct 25, 2009 9:52 am     Reply with quote

Sorry late getting back. Instead of classes and assuming you have no other input tags except the ones you want to style, you could have just used:

Code:
<style type="text/css">
input {
background: #ff0;
font-size: 18pt;
width:30px;
}
</style>


Then HTML could have been just:

Code:
<input type="button" value="X">


Changed the coding to web standards. Remember, input tags go between properly coded "form" tags. Depending on your document type, you may have to use paragraph or div tags.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial