1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sitefinity overriding anchor link colors and properties

Sitefinity overriding anchor link colors and properties

3 posts, 0 answered
  1. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    23 Jan 2012
    Link to this post
    Hello,
    In one of our new projects with Sitefinity 4.3.1885. SE, I found that Sitefinity overrides the default link colors on a page. It not only overrides the anchor link color, but it also overrides hover, visited and hover states. I found the following code that was overriding all the links on our pages from the file below:
    http://oursite.com/Telerik.Web.UI.WebResource.axd?compress=0&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2011.2.915.40%2c+Culture%3dneutral%2c+Publ
    icKeyToken%3d121fae78165ba3d4%3aen%3a9799c67b-558a-475d-bf30-a0ccf0dbb8b7%3a9ad5c0b%3abf649b0%3aed2942d4%3a8cee9284%3bTelerik.Sitefinity.Resources%2c+Version%3d4.3
    .1885.0%2c+Culture%3dneutral%2c+PublicKeyToken%3dnull%3aen%3a03746db0-4fe2-4567-92b0-24f5ce28c3e9%3ad271177c%3adff30785
    a:link, a:visited, a:hover, a:active {
    color: #105CB6;
    text-decoration: none;
    }

    I can override the styles by defining an div with an id and then override all the links in the div. But, I should be just fine by defining global links for my site and leave it there. Any reason why this is happening. Please find the attached screenshot.

    Thank you for your time.
     
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    25 Jan 2012
    Link to this post
    Hi San,

    How do you declare your anchor link styles? If your links have ids or classes set to them, and you declare the css properties to them, default styles won't override them.

    Greetings,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    26 Jan 2012
    Link to this post
    Hello Jen,

    Thank you for the reply. Yes, we can override the default link colors by defining a div and refer the links with the div id's. I prefer not to define id's or class for links on the site. What if a link is created by a user so will they remember to add id or class to it? They might be methods that can add id's or classes to links dynamically, but this should not be the approach. But, anyways I can override them using div id's.

    Thank you.
3 posts, 0 answered