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)
-   -   changing link color (https://forum.x-cart.com/showthread.php?t=43079)

junaid 10-18-2008 03:45 AM

changing link color
 
Hi,
i have just installed BCSengineering mod for changing product sort order by bestsellers, most viewed etc.

i would like to change the the color of link when user in on that link i.e if user click sorty by best seller and when page loads its color or style changes but other link around it remain same.

tried to many conditions but couldnt do it.

would appreciate any help.

JWait 10-18-2008 08:11 AM

Re: changing link color
 
This is defined in your stylesheet (skin1.css by default, but yours may be different). Look at your "A:links" ("A:link" is the default for every link on your site) and the corresponding "hovers", "visiteds", and "actives".

There may (probably will) be several different ones, and you need to find the one that applies to the link you are trying to change elsewhere in stylesheet. In the template this will be defined as a "class".

The default navigation.tpl calls the "NavigationCellSel" and "NavigationCellWide" class links, but yours may vary. Again, check the template for the exact area you are working in. It sounds like the color you want to change (or add) is probably "active".

junaid 10-19-2008 08:29 PM

Re: changing link color
 
thanks JWait.
i had seenitin navigation.tpl and i need something of that sort.

i dont want to use visited, or hovers as i want those links appear in one color whether visited or not and one which is active to other.
link:active doesnt work on this one and i dont think it can be controlled via css.
i need to change the class of link when its page is active.

i.e like on navigation.tpl if user is on page 2 , # 2 is highlighted and other numbers remain the same.

Thedae2k 10-19-2008 08:52 PM

Re: changing link color
 
change the style in the href of the link.

<a href="xyz.php" style="color#000000">whatever your text is for the link</a>

junaid 10-20-2008 12:46 AM

Re: changing link color
 
Quote:

Originally Posted by Thedae2k
change the style in the href of the link.

<a href="xyz.php" style="color#000000">whatever your text is for the link</a>


that would be link color i guess, but what when it is clicked and we are on that page.

JWait 10-20-2008 04:20 AM

Re: changing link color
 
Can you provide a link to a page on your site that has what you are talking about? If not can you provide a snippet of the code that you think is where you need the change?

Thedae2k 10-20-2008 09:23 PM

Re: changing link color
 
yeah what he said...jusy kidding!

junaid 10-22-2008 12:34 AM

Re: changing link color
 
Quote:

Originally Posted by JWait
Can you provide a link to a page on your site that has what you are talking about? If not can you provide a snippet of the code that you think is where you need the change?

here is the code:
------------------
<div id="sort">{if $url eq '' && $navigation_script ne ''}{assign var="url" value=$navigation_script|cat:"&"}{/if}<br>
Sort Products By: {foreach from=$sort_fields key=name item=field} <a href="home.php?cat={$cat}&sort={$name}">{$field}</a>
|{/foreach}</div>

--------

sort fields = new | best sellers first | price low to high | price high to low | most viewed |


what i want is when user is on New it is highlighted and others are in black font color.
when user clicks best sellers first and page loads best seller link is highlighted other links remain black.

i hope i am able to clear you guys now.
thanks for your time.

JWait 10-22-2008 03:58 AM

Re: changing link color
 
Look in your stylesheet (either skin1.css or skin_c.css depending on if you have one of x-carts custom skins) and find the class "sort". Under the closing "}" add

A.sort:active {
COLOR: #909090;
TEXT-DECORATION: none;
}

changing #909090 to whatever color you want the "highlight" to be.

junaid 10-28-2008 10:44 AM

Re: changing link color
 
Quote:

Originally Posted by JWait
Look in your stylesheet (either skin1.css or skin_c.css depending on if you have one of x-carts custom skins) and find the class "sort". Under the closing "}" add

A.sort:active {
COLOR: #909090;
TEXT-DECORATION: none;
}

changing #909090 to whatever color you want the "highlight" to be.

thanks for your reply.
actually this didnt worked, reason seems above work on plain html page not on dynamic page.
something of navigation.tpl type needs to be done when on click a class is assigned to the link active like page numbers in navigation.tpl.

Thedae2k 11-06-2008 08:03 PM

Re: changing link color
 
you need to use style formatting in the href.


All times are GMT -8. The time now is 09:23 PM.

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