Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Need help editing button.tpl & making it work

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-09-2007, 09:58 AM
 
hhiker hhiker is offline
 

eXpert
  
Join Date: May 2007
Posts: 231
 

Default 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.

Thanks!
__________________
-
-
Versions: 4.1.10 and 4.3.0 (see post for which cart)

"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison

"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982

"Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes
Reply With Quote
  #2  
Old 08-09-2007, 10:30 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Need help editing button.tpl & making it work

http://forum.x-cart.com/showthread.php?t=29288
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 08-09-2007, 10:56 AM
 
hhiker hhiker is offline
 

eXpert
  
Join Date: May 2007
Posts: 231
 

Default Re: Need help editing button.tpl & making it work

Thanks Phil!!!

I searched & did not find that thread.
__________________
-
-
Versions: 4.1.10 and 4.3.0 (see post for which cart)

"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison

"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982

"Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes
Reply With Quote
  #4  
Old 08-09-2007, 11:33 AM
 
hhiker hhiker is offline
 

eXpert
  
Join Date: May 2007
Posts: 231
 

Default 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.
__________________
-
-
Versions: 4.1.10 and 4.3.0 (see post for which cart)

"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison

"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982

"Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes
Reply With Quote
  #5  
Old 08-09-2007, 02:39 PM
 
phoenixrider phoenixrider is offline
 

Member
  
Join Date: Aug 2007
Posts: 15
 

Default Re: Need help editing button.tpl & making it work

What about just doing a graphic button?
__________________
v 4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:22 AM.

   

 
X-Cart forums © 2001-2020