Author Topic: Visited links in different color?  (Read 31413 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Visited links in different color?
« Reply #15 on: February 22, 2003, 01:48:50 AM »
interesting.
but, see, the footer is working as u wanted. that's because link to 4homepages.de doesnt have a class.
so, u'll need add :visited attribute to each class ID u want use as link. (same what SLL said before)

also, try to replace body tag:
Code: [Select]
<BODY bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #16 on: February 22, 2003, 01:49:01 AM »
Well...I can't see if it works since you have the same format on a:link & a:visited.

The link, hover and active have never been a problem for me, it's "just" the visited.
If you have a separate color on visited links in the css it doesn't work.
They always go back to the normal link color. But not on all links...that's the strange thing.
It works on "New images" but not on "Top images".
It works on the "Keywords" links, but not on the "Added by" links

I think the 4images script is really, really good. By far the best photo script I've seen, and belive me I have looked around a lot  :)

But the way the css works doesn't feel good...there must be something "wrong" somewhere.

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #17 on: February 22, 2003, 01:51:54 AM »
Quote from: V@no
interesting.
but, see, the footer is working as u wanted. that's because link to 4homepages.de doesnt have a class.
so, u'll need add :visited attribute to each class ID u want use as link. (same what SLL said before)

also, try to replace body tag:
Code: [Select]
<BODY bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">

Still the same problem...

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Visited links in different color?
« Reply #18 on: February 22, 2003, 01:53:14 AM »
Quote from: Korak
...update a page = back from Purple to #336699.


What exactly do you mean "update a page"?

What kind of update and to which file?

And with which link, from your posted URL, are you having this problem?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Visited links in different color?
« Reply #19 on: February 22, 2003, 01:54:10 AM »
final question, did u try this way?:
Quote
A.maincat:visited { color: Purple; }
A.maincat:link { color: #336699; }
A.maincat:hover { color: #CC0000; }
A.maincat:active { color: #FF0000; }
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #20 on: February 22, 2003, 01:55:34 AM »
I didn't do this when I used the original files...I can try it right away.
Hang on...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Visited links in different color?
« Reply #21 on: February 22, 2003, 01:56:37 AM »
Quote from: Korak
I didn't do this when I used the original files...I can try it right away.
Hang on...
:roll:
 :wink:
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Visited links in different color?
« Reply #22 on: February 22, 2003, 01:58:16 AM »
think i know, what's going on...
Quote
      <td nowrap class="navbar" align="right" valign="middle" width="20%">
      <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
      <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
      <a href="{url_faq}"><b>{lang_faq}</b></a>&nbsp;
       </td>

there's no class assigned directly to the links, so "navbar" from table is used. either you should change colors in "navbar" class, or add class to each link. sorry, it's to late now to check, try yourself  :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Visited links in different color?
« Reply #23 on: February 22, 2003, 02:02:09 AM »
Quote from: SLL
think i know, what's going on...
Quote
      <td nowrap class="navbar" align="right" valign="middle" width="20%">
      <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
      <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
      <a href="{url_faq}"><b>{lang_faq}</b></a>&nbsp;
       </td>

there's no class assigned directly to the links, so "navbar" from table is used. either you should change colors in "navbar" class, or add class to each link. sorry, it's to late now to check, try yourself  :)

this case, I'd think same as Korak: since <a> doesnt have a class, it should uses the default class asigned to A in the style.css...
very tricky.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #24 on: February 22, 2003, 02:07:53 AM »
Now I changes the original a hover section into this:
Code: [Select]
a:visited { text-decoration: underline; color: Purple }
a:link { text-decoration: underline; color: #336699; }
a:hover { text-decoration: underline; color: #CC0000; }
a:active { text-decoration: underline; color: #FF0000; }

A.navbar:visited { color: Purple; }
A.navbar:link { color: #336699; }
A.navbar:hover { color: #CC0000; }
A.navbar:active { color: #FF0000; }

A.row2:visited { color: Purple; }
A.row2:link { color: #336699; }
A.row2:hover { color: #CC0000; }
A.row2:active { color: #FF0000; }

A.maincat:visited { color: Purple; }
A.maincat:link { color: #336699; }
A.maincat:hover { color: #CC0000; }
A.maincat:active { color: #FF0000; }

No differnce at all.

Guess I have to add classes to every link in every template by hand to get it to work   :cry:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Visited links in different color?
« Reply #25 on: February 22, 2003, 02:13:38 AM »
Quote from: SLL
think i know, what's going on...
Quote
      <td nowrap class="navbar" align="right" valign="middle" width="20%">
      <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
      <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
      <a href="{url_faq}"><b>{lang_faq}</b></a>&nbsp;
       </td>

there's no class assigned directly to the links, so "navbar" from table is used. either you should change colors in "navbar" class, or add class to each link. sorry, it's to late now to check, try yourself  :)

dont skip what SLL find out. ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Visited links in different color?
« Reply #26 on: February 22, 2003, 02:19:18 AM »
There was a reason I posted a couple of questions.

If I understand it correctly, the link color is only an issue after "the page" is updated.  Right?  

Not positive I can help but I have a suspicion.  I can only forumlate an answer if I get a wee bit more information...

One additional question, by "update" do you mean browser refresh or update the content of the page by editing something?

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #27 on: February 22, 2003, 02:23:41 AM »
Quote from: V@no
dont skip what SLL find out. ;)

I think I tried this by adding the:
Code: [Select]
A.navbar:visited { color: Purple; }
A.navbar:link { color: #336699; }
A.navbar:hover { color: #CC0000; }
A.navbar:active { color: #FF0000; }

Offline Korak

  • Newbie
  • *
  • Posts: 30
    • View Profile
Visited links in different color?
« Reply #28 on: February 22, 2003, 02:23:58 AM »
Quote from: Chris
If I understand it correctly, the link color is only an issue after "the page" is updated.  Right?  

Yes, that's right.
Let's say I click on a Category and then go back by using the backbutton in my browser...the links is Purple like it should be.
As soon as I update the page the link goes back to the normal a:link color.

Added: Yes, I meen a browser refresh...clicking F5.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Visited links in different color?
« Reply #29 on: February 22, 2003, 03:23:11 AM »
Okay, I got it now.

Try this for me.  Go to your gallery's home page and scroll all the way to the bottom.  Try the same procedure you've described with the 4homepages.de link.  I think you'll find the results interesting.

Same thing for your link "Eskobar Online".

Notice how those links don't have any css classes attached to them. Whereas this link does:
Code: [Select]
<a href="./categories.php?cat_id=7&amp;s=0fda887174e8d2eaa6d14c3a2a60ee74" class="subcat">Tourposters</a>

Have you tried this in your style sheet?
Code: [Select]
.subcat {
  font-family: Verdana, Arial, Helvetica, Geneva, sans-serif;
  font-size: 10px;
  font-weight: bold;
}

.subcat:visited {
  color: Purple;
  font-family: Verdana, Arial, Helvetica, Geneva, sans-serif;
  font-size: 10px;
  font-weight: bold;
}

You will need to add active, hover, link and visited as I've shown above since the class subcat and maincat are used for links.  Same holds true for any other css class you choose to apply to links.