www.webdeveloper.com
Results 1 to 6 of 6

Thread: visited link have different back ground color

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    36

    visited link have different back ground color

    <style type="text/css">
    @media screen{
    a:link {

    font-family: verdana;
    font-size: 9pt;
    color: black;
    text-decoration: none;
    background-color: white;
    }

    a:visited { text-decoration: line-through;
    font-size: 7pt; background:lime;}

    }

    </style>


    <p><a href=${PAGE}?PageNum=$p> $p </a>

    Posts: 59
    Joined: Sun Jun 26, 2011 9:56 pm

  2. #2
    Join Date
    Apr 2005
    Location
    Essex, United Kingdom
    Posts
    187
    Is there a question here?

  3. #3
    Join Date
    Apr 2011
    Posts
    36
    Quote Originally Posted by Typhoon101 View Post
    Is there a question here?
    Firefox did not change background color

  4. #4
    Join Date
    Apr 2005
    Location
    Essex, United Kingdom
    Posts
    187
    The only thing that stopped this working in firefox for me, was the fact the link is not valid. If you put quotes around the href, and point to a valid link, the :visited rule works just fine. (not forgetting to close your <p> tag of course)

    <p><a href="http://google.com"> $p </a></p>.

    the "Line-through" and "Font-size" rules on the other hand may not work. There is debate about a security risk when styling visited links, so firefox only allow a small handful of properties to be altered. You can read more at http://hacks.mozilla.org/2010/03/pri...-css-vistited/

  5. #5
    Join Date
    Apr 2011
    Posts
    36
    Quote Originally Posted by Typhoon101 View Post
    The only thing that stopped this working in firefox for me, was the fact the link is not valid. If you put quotes around the href, and point to a valid link, the :visited rule works just fine. (not forgetting to close your <p> tag of course)

    <p><a href="http://google.com"> $p </a></p>.

    the "Line-through" and "Font-size" rules on the other hand may not work. There is debate about a security risk when styling visited links, so firefox only allow a small handful of properties to be altered. You can read more at http://hacks.mozilla.org/2010/03/pri...-css-vistited/
    thanks for point that out, since I can go to the correct page that I want , so I thought my URL is valid,
    I need to find a way to make my URL valid ,
    do you have any idea , why Firefox identify my URL is not valid , bur on IE is valid?

  6. #6
    Join Date
    Apr 2005
    Location
    Essex, United Kingdom
    Posts
    187
    It looks like you are using some server side language, maybe even something like WordPress or Joomla. The link ${PAGE} is not a valid link, but it may evaluate to something more meaningful when it is written to the page.

    Try viewing the source of the page itself and looking at the link. That might give you a clue. It might be a simple case of putting quotes around it. If not, is this page in a live environment where we can see the code for ourselves?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles