Jump to content

colorize a button


george

Recommended Posts

I know I have seen them, little white Xs on a red background - button. I want one. I have tried setting the foreground and background within the button tag outside the button tag in a span tag both surrounding the button and span tag just surroundin my "X". But none of this works. The code I am using looks like this...

<button onclick='canPS("Cancel");'><span style="font-size:12px; color:#FFFFFF background-color:#FF0000; float:right;">X</span></button>

Or

<span style="font-size:12px; color:#FFFFFF background-color:#FF0000; float:right;"><button onclick='canPS("Cancel");'X</button></span>

Or

<button onclick='canPS("Cancel");' style="font-size:12px; color:#FFFFFF background-color:#FF0000; float:right;">X</button>

But I keep getting a little gray button with a thin black X. I looked it up in the tutorial, and there appears to be no way to change this. Maybe I need to emulate a button by making two image files, one for click, one for not clicked?

Link to comment
Share on other sites

The only problem with your code is a syntax error in your CSS:<button onclick='canPS("Cancel");' style="font-size:12px; color:#FFFFFF; background-color:#FF0000; float:right;">X</button>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...