![]() |
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. |
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". |
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. |
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> |
Re: changing link color
Quote:
that would be link color i guess, but what when it is clicked and we are on that page. |
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?
|
Re: changing link color
yeah what he said...jusy kidding!
|
Re: changing link color
Quote:
------------------ <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. |
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. |
Re: changing link color
Quote:
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. |
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.