Forum Moderators: not2easy

Message Too Old, No Replies

Multiple Colors in HTML Button

Multiple Colors in HTML Button

         

Perfect Member Name

9:54 pm on Jan 8, 2004 (gmt 0)

10+ Year Member



I think I've seen this before...

I'm trying to use 2 different font colors in an HTML button. Font tags in the "value" attribute don't seem to work (the tags are just spelled out in the button). I can't figure out how to specify which characters should be a certain color via CSS...

Any ideas?

choster

10:03 pm on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The button can be styled as a whole, but you cannot apply different styles to different parts of the same label. What you can do is create a graphic that looks like a button, and insert it as an <input type="image">.

Perfect Member Name

10:08 pm on Jan 8, 2004 (gmt 0)

10+ Year Member



Okay, is there a way to use text followed by an icon in a button? For example, a button that reads "Delete" and then has a small red X graphic next to it?

grandpa

7:48 am on Jan 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi Perfect_Member_Name

In case you haven't heard this yet, "Welcome to WW"

Here's what I do to show a button and text.

<style>
.d2a{
position: relative; width: 710px; border-top:0px; border-bottom:0px; border-left:0px; border-right:0px; margin: 0px; padding: 0px;
}
.GoCart{
width: 60px; height: 40px; border-width: 0px;
}
.f3{
font-family: Arial; font-size: 9pt; font-weight: bolder;
background-color: #808080; position: relative; width: 710px; margin: 0px; padding: 5px 0px 2px 0px;
}
</style>

<div class=d2a>
<form method=post action=h*tp://www.mycart.net/cgi-bin/cart.cgi>
<input type=hidden name=ViewCart value=nnnn>
<p class=f3>
<input class=GoCart src=h*tp://www.mysite.com/image/Cart.gif type=image>View Shopping Cart/Check Out</p>
</form>
</div>

HTH
grandpa