1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Link Colour after clicking

Discussion in 'HTML & Website Design' started by TheDutchMan, Nov 23, 2008.

  1. #1
    Hi Guys,

    I was hoping that one of you could help me out with this.

    I just made page in Dreamweaver and when I click the links the colour changes.

    What code do I need to add to determine the colour after links are clicked?

    I'm not using a CSS for this single page.

    Thanks
     
    TheDutchMan, Nov 23, 2008 IP
  2. drew22299

    drew22299 Guest

    Messages:
    76
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could add this at the top of your page and change the colour for when the link has been visited:

    <style type="text/css">
    A:link {text-decoration: none}
    A:visited {text-decoration: none; color: red}
    A:active {text-decoration: none}
    A:hover {text-decoration: underline;}
    </style>
     
    drew22299, Nov 24, 2008 IP
    TheDutchMan likes this.
  3. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Worked like a charm, thanks!!
     
    TheDutchMan, Nov 24, 2008 IP
  4. drew22299

    drew22299 Guest

    Messages:
    76
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're welcome!
     
    drew22299, Nov 25, 2008 IP
  5. Limotek

    Limotek Peon

    Messages:
    165
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Not sure I understand, are you looking to find out what the colour of visited links is or how to change that colour?

    The colour of visited links is defined by the :visited attribute.

    Best thing to do if you want to change the colour would be to to create a CSS style in Dreamweaver.

    Click on one of your links, next to the style box in the properties panel, you should see a CSS button. This opens the CSS panel on the right. Click new CSS Rule (towards the bottom of the CSS panel) and choose selector type as tag. Find the tag 'a' from the list and then style how you want the link to appear. You can then repeat to create another CSS rule but this time, instead of just selecting a, type a:visited into the tag box. Then style how you want visited links to appear and you're done. The good thing about doing it this way is that all links wil be styled how you want in one go. (Please excuse me if I'm stating the obvious but I wasn't sure of the level you're at)

    Using this method, you can also set the hover attribute using a:hover so that the links change colour, etc when you mouse over them.

    If you're looking to find out what colour is being used for visited links, switch to code view and search for a:visited, you should then see the colour code, alternatively, you may see the attibutes within the links themselves in the HTML code.

    Hope that helps.
     
    Limotek, Nov 25, 2008 IP
    TheDutchMan likes this.
  6. cipals15

    cipals15 Well-Known Member

    Messages:
    1,085
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    100
    #6
    Dreamweaver has code editing capabilities right? You could also search for keywords in codes.. Search for the color or :visited or style or anything. :D
     
    cipals15, Nov 25, 2008 IP
  7. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks Limotek, I wanted to change the colour of visited links. I've learned dreamweaver myself and I didn't use the CSS button before but it's a great tip.

    I now copied the text from drew's post into my editor. Next time I'll use the CSS button.

    Another rep given, thanks!!

    @ Cipals, this was the problem, I made the page myself and I didn't know how to name this or how to do this. :)
     
    TheDutchMan, Nov 25, 2008 IP