X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   how do you make a button appear pressed down upon clicking? (https://forum.x-cart.com/showthread.php?t=22541)

AKR 06-15-2006 04:45 PM

how do you make a button appear pressed down upon clicking?
 
like, the "buy now" or "add to cart" buttons. it makes it easier for people to know that the page is actually loading. anyone? thanks in advance.

balinor 06-15-2006 05:31 PM

You would need to use a JavaScript onclick function. Google it, it is pretty easy to use...

AKR 06-16-2006 02:09 AM

alright, i'll check it out. thanks

lachild 06-16-2006 02:49 PM

Quick Help
 
Heres an easy fix..

add this to your Img tag...

ONMOUSEDOWN="this.src='url_to_your_pushed_image_go es_here'"

So now the tag looks like:

[img]first_image.gif[/img]


You only need to change the first_image.gif to your main image and url_to_your_pushed_image_goes_here to the image you made of the pushed image. Leave the rest of the tag the same

AKR 06-20-2006 02:35 PM

Re: Quick Help
 
Quote:

Originally Posted by lachild
Heres an easy fix..

add this to your Img tag...

ONMOUSEDOWN="this.src='url_to_your_pushed_image_go es_here'"

So now the tag looks like:

[img]first_image.gif[/img]


You only need to change the first_image.gif to your main image and url_to_your_pushed_image_goes_here to the image you made of the pushed image. Leave the rest of the tag the same


didn't work for me. neither image showed up doing that. :(

photo 07-13-2006 01:03 PM

Here is what I used in my button.tpl to produce a mouse over effect and it seems to work well, just change the colours to whatever you need. I also changed

Code:

<td class="Button"onmouseover="this.style.backgroundColor='#487600';"
onmouseout="this.style.backgroundColor='#335300';">
                <font class="Button">{$button_title}</font>
        </td>


And this is what I have for the class TD.Button in skin1/skin1.css

Code:

TD.Button {                                                               
        BACKGROUND-COLOR: #335300;
        padding:4px;
        COLOR: #FFF;
        FONT-WEIGHT: bold;
        FONT-SIZE: 11px;
        TEXT-ALIGN: center;
}



All times are GMT -8. The time now is 03:37 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.