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)
-   -   Need help editing button.tpl & making it work (https://forum.x-cart.com/showthread.php?t=33158)

hhiker 08-09-2007 09:58 AM

Need help editing button.tpl & making it work
 
I could use a little help on my button.tpl file. I am wanting to make it a CSS rollover button (no images what-so-ever) instead of the stock image buttons. The reason for the rollover button it for it to match the navigation rollover that I have created.

Here is the original button code that I THINK I should be modifying:

Quote:

<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td>
<{$img_type} src="{$ImagesDir}/but1.gif" class="ButtonSide" alt="{$title|escape}" />
</td>
<td class="Button"{$reading_direction_tag}>
<font class="Button">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but2.gif" class="ButtonSide" alt="{$title|escape}" />
</td>
</tr>
{/strip}
</table>


Here is what I changed it to:

Quote:

<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td class="rbutton1" onmouseover="this.className='rbutton2'"onmouseout= "this.className='rbutton1'"{$reading_direction_tag }>
<font class="rbuttonf">{$button_title}</font>
</td>
</tr>
{/strip}
</table>

And I have the following CSS for it:

Quote:

.rbutton {
color: #ff0000;
padding: 6px;
list-style-type: none;
text-align: left;
text-indent: 10px;
white-space: nowrap;
font-size: 11px;
background-color: #554b1e;
border: #000000 1px solid;
}
.rbutton1 {
color: #ffffff;
padding: 6px;
list-style-type: none;
text-align: left;
text-indent: 10px;
white-space: nowrap;
font-size: 11px;
background-color: #554b1e;
border: #000000 1px solid;
}
.rbutton2 {
padding: 6px;
background-color: #8d8558;
color: #000000;
list-style-type: none;
text-align: left;
text-indent: 10px;
white-space: nowrap;
font-size: 11px;
border: #000000 1px solid;
}
A.rbutton1:link {
COLOR: #ffffff;
TEXT-DECORATION: none;
}
A.rbutton1:visited {
COLOR: #ffffff;
TEXT-DECORATION: none;
}
A.rbutton1:hover {
COLOR: #ffffff;
TEXT-DECORATION: none;
}
A.rbutton1:active {
COLOR: #ffffff;
TEXT-DECORATION: none;
}
.rbuttonf {
color: #ffffff;
padding: 6px;
list-style-type: none;
text-align: left;
text-indent: 10px;
font-size: 11px;
}

Can anyone tell me why this is not working? I am not getting the background color that I am looking for nor am I getting my rollover effects. :cry:

Thanks!

PhilJ 08-09-2007 10:30 AM

Re: Need help editing button.tpl & making it work
 
http://forum.x-cart.com/showthread.php?t=29288

hhiker 08-09-2007 10:56 AM

Re: Need help editing button.tpl & making it work
 
Thanks Phil!!!

I searched & did not find that thread.

hhiker 08-09-2007 11:33 AM

Re: Need help editing button.tpl & making it work
 
Can someone answer me one more question?

Why does it matter where in the CSS that stuff lies? I deleted the original & put it at the end and it would not work. I put it back up where the original was and it worked. I am totally confused on that one.

phoenixrider 08-09-2007 02:39 PM

Re: Need help editing button.tpl & making it work
 
What about just doing a graphic button?


All times are GMT -8. The time now is 09:49 AM.

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