PDA

View Full Version : font color for buttons


niKKi
08-08-2002, 07:48 PM
i used this code on my site:
<BR><input type="button" value=" SEND " onclick="process();" style="font-family:arial; font-color=FFFFCC; font-size=8pt; border:2; border-color:FFFFCC; border-style:dashed; background-color:black">
<input type="button" value=" CLEAR " onclick="process();" style="font-family:arial; font-color=FFFFCC; font-size=8pt; border:2; border-color:FFFFCC; border-style:dashed; background-color:black">

but when i looked at my site, everything worked except for the font color. whats wrong?

-niKKi

Roy Sinclair
08-08-2002, 08:05 PM
Your style declarations have numerous errors:

First it's color not font-color , next you are using property = value instead of property : value in some places and third is that colors specified with hex values should be specified #FFFFCC not FFFFCC (you left off the # ).

Fix those things and you'll start seeing something you expect.

duniyadnd
08-10-2002, 07:48 AM
et voila...

<input type="button" value=" SEND " onclick="process();" style="font-family:arial; color=#FFFFCC; font-size:8pt; border:2; border-color:#FFFFCC; border-style:dashed; background-color:#000000">
<input type="button" value=" CLEAR " onclick="process();" style="font-family:arial; color:#FFFFCC; font-size:8pt; border:2; border-color:#FFFFCC; border-style:dashed; background-color:#000000">

******

just fyi, you could just create a css file and call it in within your head tag

<link rel="stylesheet" type="text/css" href="css/main.css">
create a new class by saying

.button
{
font-family:arial; color=#FFFFCC; font-size:8pt; border:2; border-color:#FFFFCC; border-style:dashed; background-color:#000000
}

and everytime you call in the button, you just have to say

<input type="submit" value="Submit Now" class="button">

:D

Enjoy
Duniyadnd

redhead
08-10-2002, 11:32 AM
except that should be:

.button
{
font-family:arial; color: #FFFFCC; font-size:8pt; border:2; border-color:#FFFFCC; border-style:dashed; background-color:#000000
}

instead of color=#FFFFCC;

duniyadnd
08-10-2002, 11:34 AM
ooops.. my bad... glory of cut and paste :o