Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting add to cart buttons

Status
Not open for further replies.

tnsbuff

Technical User
Jan 23, 2002
216
US
Hi,

I have a site that has lots of items with the ugly, gray "Add to Cart" submit buttons as part of the shopping cart script.

Is there a way to format the color, etc. or maybe even substitute an image for all of these from an external style sheet? Otherwise, I'm afraid I'm going to have to go into the script itself to format them.

Thanks for any tips or ideas you might be able to share.
 
What cart is it? have you checked their FAQ or Support area? To format them you HAVE to go into the script itself if they don't let you via an admin. You can add style sheets or change to images. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
>> You can add style sheets or change to images<<

But how do you format all submit buttons via an external style sheet? What is the syntax?

Thanks,
 
Hi,

To link to an external style sheet you use this:
<LINK REL=&quot;stylesheet&quot; HREF=&quot;style.css&quot; TYPE=&quot;text/css&quot;>

In the stylesheet you simply put in: (this is for all input types, {text, password, submit, reset, etc}
-----------[CUT LINE]-----------
input {color: #000000; background-color:#FF0000; font-family:Arial; font-size: 10px; font-weight: none; border: solid 1 #0000FF;}
-----------[CUT LINE]-----------



Or if you just want to do it to only the submit buttons then make your own class:
-----------[CUT LINE]-----------
input.submit {color: #000000; background-color:#FF0000; font-family:Arial; font-size: 10px; font-weight: none; border: solid 1 #0000FF;}
-----------[CUT LINE]-----------

You will have to go through all the HTML and script pages and do a search for the word SUBMIT and then when you find <INPUT TYPE=&quot;SUBMIT&quot;> inside the tag add CLASS=&quot;submit&quot; and then all the submit buttons will be formatted the way you want them to be.

Hope this helps!

greenjumpy.gif
NATE
design@spyderix-designz.com
 
Ok thanks. I guess I can't do it without going through everything and specifying the class, which is what I was trying to avoid.

It seems like you should be able to format all submit buttons from an external style sheet, just like you can format other tags, such as p, h1, etc.

. . . but I guess not. Maybe in css3.

Thanks again,
 
If you have that many items, I'd recommend using a database. You could then use a server side script to loop through the items and display the submit button. There would be only one button that generates all of the other ones, making it much easier to edit.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top