MOSS 2007, how to highlight Visited list items? RRS feed

  • Question

  • Hi,

    I have added the following CSS to my page to be able to highlight the visited links on a page to red color:

    .ms-propertysheet A:visited {

    COLOR: #ff00


    It works fine with ordinary hyperlinks, however it is not working with sharepoint lists. When a user clicks on a list item, the navigated URL is different than the href of the list hyperlink, means it includes SOURCE query string.

    Is there any way to have the hyperlink of the visited list items with different color?

    Thank you,

    Thursday, August 9, 2012 3:04 AM

All replies

  • Hi;

    I don't Know MOSS 2007..

    But for debug, you can use F12 on IE and and watch what css is applied


    .ms-propertysheet A:visited {
    COLOR: #ff00!important


    Thursday, August 9, 2012 10:30 AM
  • Hi NicoBzh,

    The issue here is not CSS at all. visited links are changing to red, so no problem with CSS.

    The problem is SharePoint 2007 list hyperlink href url is not the same as the visited url because a javascript adds SOURCE query string to the end of the url.

    Has anyone encounter ans solved this issue?

    Thank you,

    Thursday, August 9, 2012 11:40 AM
  • Hi Allan,

    I am able to get this to work as NicoBzh suggested.  On SharePoint 2007, I have a custom list with a new hyperlink column, I then add a content editor webpart to the custom list page.  Edit the Content Editor Webpart to include the Source Editor works for me:

    <style type="text/css">

    .ms-propertysheet A:visited {

    COLOR: #ff00 !important;





    Wednesday, September 5, 2012 12:42 AM
  • Hi Amy,

    The hyperlink columns are static and they are do not relate to this question.

    I am referring to the link to list item detail that appears in the default view of any list. The link includes a javascript and adds a "SOURCE" querysting to the list detail url. To understand my question and my reply to NicoBzh try to actually click on any list item and note the next page's query string SOURCE. 

    Thank you,

    • Edited by Allan48 Wednesday, September 5, 2012 2:08 AM typo
    Wednesday, September 5, 2012 2:07 AM
  • Hi Allan,

    In case you didn't see it before, take a look at the CSS reference from below link


    Although your CSS code is fine, it's not being applied on the list. the links in list items must have extra CSS applied so that they always have same color whether visited or not. You'll probably need to capture the proper css class/ids for the visited code to be applied on them. The above reference might help. If not, you can always use the IE Developer tool and take a look at the html tag for the list hyperlinks and go from there.


    Thursday, September 6, 2012 2:27 AM
  • Hi Parvez,

    The link you referred me is a great resource, however, the visited link problem I asked is not related to CSS.

    Try to simply reproduce it with any sharepoint list. The list's hyperlink href url is not same as the link that the clink navigates. The root of the problem is a a javascript code and I don't think there is any oob way of fixing this.

    Thank you,

    Thursday, September 6, 2012 2:20 PM
  • Hi Allan,

    As I said before, the CSS code seems fine to me. However, you probably know already that there's an order in which CSS code is applied to html tags and has different/hierarchy importance based on how the CSS code is being applied.

    Javascript code is typically used for dynamic behaviour. I doubt that's what is controlling the CSS for hyperlinks in your list.

    Have you tried using the IE developer tool to take a look at the html nodes of the link? It can also show you what kind of existing CSS rule is currently being applied to selected html tag. It's a really handy tool. Try it out.

    Unfortunately, I never had to do what you're looking for. So, can't give you a quick solution.

    Good luck!!


    Friday, September 7, 2012 12:57 AM
  • Hi Allan,

    Have you find any solution for this problem?
    How did you handle that javaScript? 
    Thursday, September 27, 2012 8:40 PM
  • Hi Iamthevictory,

    I don’t think there is any out of the box capability to fix the problem.

    I created a SharePoint designer data viewer web part and created the list urls the way that I needed


    Friday, September 28, 2012 2:24 AM