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)
-   -   What am I doing wrong in my code & CSS??? (https://forum.x-cart.com/showthread.php?t=32618)

hhiker 07-17-2007 11:51 AM

What am I doing wrong in my code & CSS???
 
I can not get my link colors to change in the top menu navigation (out of the box was the tabs at the top but I modified it). For some reason, it wants to default to the sitewide standard and that will not work b/c of the bgcolor they are on. Here is the code I have:

Quote:

<table cellpadding="0" cellspacing="0" dir="ltr">
<tr>
<td class="tab" {$reading_direction_tag}>{$tab_title}</td>
</tr>
</table>


Here is the CSS I have to go with the tab class:

Quote:

.tab {
COLOR: #ffffff;
FONT-WEIGHT: bold;
TEXT-TRANSFORM: uppercase;
WIDTH: 85px;
HEIGHT: 30px;
TEXT-ALIGN: center;
}
A:link.tab {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A:visited.tab {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A:hover.tab {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A:active.tab {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}



Now, I cheated & copied the link CSS from another area that had the same definitions, just different class & color. They work but I can not get this to work. Am I missing something on the whole tab menu thing today? My brain does tend to quit processing data properly later in the day. :roll:

Thanks,
Jen

Jayk 07-17-2007 12:00 PM

Re: What am I doing wrong in my code & CSS???
 
I think you need a TD.tab entry in your css.

Jason

hhiker 07-17-2007 12:21 PM

Re: What am I doing wrong in my code & CSS???
 
Well, I just figured out a work around. I am not sure about doing it this way but it is the only way that is working today.

I edited this segment of the top_menu.tpl file to include the class without quotes around the class name and it works. So I am leaving it for now.

Quote:

{section name=sb loop=$speed_bar}
{if $speed_bar[sb].active eq "Y"}
<td valign="top">{include file="customer/tab.tpl" tab_title="<a href=\"`$speed_bar[sb].link`\" class=tab>`$speed_bar[sb].title`</a>"}</td>
{/if}
{/section}


ARW VISIONS 07-17-2007 08:01 PM

Re: What am I doing wrong in my code & CSS???
 
I think you syntax is incorrect.

should be

A
.tab:link {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A
.tab:visited {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A
.tab:hover {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}
A
.tab:active {
COLOR: #ffffff;
TEXT-DECORATION: NONE;
}


All times are GMT -8. The time now is 11:29 AM.

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