george Posted May 14, 2008 Share Posted May 14, 2008 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 More sharing options...
george Posted May 14, 2008 Author Share Posted May 14, 2008 Problem solved by creating my own gif of a white X on a red background - beveled. I sure would like to have control of the default button though. Link to comment Share on other sites More sharing options...
Ingolme Posted May 14, 2008 Share Posted May 14, 2008 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 More sharing options...
newseed Posted May 14, 2008 Share Posted May 14, 2008 Using a CSS method (background-image:) will work. You can even use one image to do the whole thing or you can just use one image for the default and the another for mouseover. You can check this one I did for my website: CSS Menu Link to comment Share on other sites More sharing options...
george Posted May 14, 2008 Author Share Posted May 14, 2008 The only problem with your code is a syntax error in your CSS:Oh my. Glad I came back. Thanks. Link to comment Share on other sites More sharing options...
george Posted May 14, 2008 Author Share Posted May 14, 2008 Using a CSS method (background-image:) will work.Wow, thanks. I bookmarked your site. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.