LI icon visited link

Discussion in 'HTML' started by Polder, Mar 3, 2006.

  1. Polder

    Polder Guest

    Hi,
    I have a menu built this way:

    <div class="menu">
    <ul class="ul_menu">
    <li><a title="click download" href="#">link 1</a></li>
    <li><a title="cap I" href="#beatus">link 2</a></li>
    ....
    </ul>

    CSS ul_menu class is:

    ul.ul_menu{list-style-image: url(menu.gif);}

    Now, I would like to change the icon whenever the corresponding link has
    been visited.
    Is it possible? How?

    Thanks.
    Polder, Mar 3, 2006
    #1
    1. Advertising

  2. Polder

    BootNic Guest

    > "Polder" <povez@___.__> wrote:
    > news:44084b91$0$36929$....
    >
    > Hi,
    > I have a menu built this way:
    >
    > <div class="menu">
    > <ul class="ul_menu">
    > <li><a title="click download" href="#">link 1</a></li>
    > <li><a title="cap I" href="#beatus">link 2</a></li>
    > ...
    > </ul>
    >
    > CSS ul_menu class is:
    >
    > ul.ul_menu{list-style-image: url(menu.gif);}
    >
    > Now, I would like to change the icon whenever the corresponding
    > link has been visited.
    > Is it possible? How?



    You could use the links background img, padding and margin to get the effect.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <style type="text/css">
    #fgh a:link{
    margin-left:15px;
    padding-left: 20px;
    color:red;
    background-image: url(x.gif);
    background-position: left center;
    background-repeat: no-repeat;
    }
    #fgh a:visited{
    margin-left:15px;
    padding-left: 20px;
    color:red;
    background-image: url(o.gif);
    background-position: left center;
    background-repeat: no-repeat;
    }
    #fgh a:hover{
    margin-left:15px;
    padding-left: 20px;
    color:red;
    background-image: url(-.gif);
    background-position: left center;
    background-repeat: no-repeat;
    }
    #fgh,#fgh li{
    margin:0;
    padding:0;
    list-style: none;
    }
    </style>
    <title></title>
    </head>
    <body>
    <ul id="fgh">
    <li><a href="http://www.yahoo.com">yahoo</a></li>
    <li><a href="http://www.google.com">google</a></li>
    <li><a href="http://www.ask.com">ask</a></li>
    </ul>
    </body>
    </html>

    --
    BootNic Friday, March 03, 2006 5:27 PM

    My problem lies in reconciling my gross habits with my net income.
    *Errol Flynn*
    BootNic, Mar 3, 2006
    #2
    1. Advertising

  3. Polder

    Toby Inkster Guest

    Toby Inkster, Mar 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miro Durcik

    app.rc resource's icon to .net Icon

    Miro Durcik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,381
    Miro Durcik
    Oct 9, 2004
  2. Dot net work
    Replies:
    2
    Views:
    424
  3. Dan Polansky
    Replies:
    3
    Views:
    789
    Larry Barowski
    Feb 12, 2007
  4. Bodi
    Replies:
    1
    Views:
    272
    Lasse Reichstein Nielsen
    Nov 18, 2003
  5. friday13
    Replies:
    3
    Views:
    172
    friday13
    Apr 28, 2007
Loading...

Share This Page