45 users online (1 members and 44 guests)  

Thread: about links


  Results 1 to 3 of 3

Related

  1. links links and selectbox    Forum: HTML Forum
    Replies: 1
  2. No Links    Forum: HTML Forum
    Replies: 15
  3. Replies: 0
  1. #1
    Dick Roose's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2008
    Posts
    1

    about links

    Hi All,

    I am a newbe and I have 2 problems.

    First, I have this code in my GettingStarted.html
    Code:
    <a style="CURSOR: crosshair" href="GettingStarted2.html" >NEXT</a>
    When I click it in my Browser, I get the error Page "This program cannot display the webpage". Both GettingStarted.html and GettingStarted2.html are in the same directory. I know my browser is working because the identical href code works in another site. I got the sourse code from that and copy pasted it into my code with just the destination changed and it doesn't work in my code. Could there be come code before this code that is screwing it up?

    Can anyone suggest why this is so? I don't believe the code is wrong, but would love to find out that it is!

    The second problem I have is that I do not want any change in the color of the text when I click on it and come back to the page. I want the text to stay black no matter how it is clicked.

    I have tried adding css style to the code

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>GettingStarted.html</title>
    <style type="text/css">
    <!--
    :link { text-decoration: none color: rgb(0, 0, 0) } /* for unvisited links */
    :visited { text-decoration: none color: rgb(0, 0, 0) } /* for visited links */ 
    :hover { text-decoration: none color: rgb(0, 0, 0) } /* when mouse is over link */
    :active { text-decoration: none color: rgb(0, 0, 0) } /* when link is clicked */
    -->
    </style>
    </head>
    but it seems to make no difference. Is there some thing wrong with the css code? I copied and paster it right from a css tutor manual. Is there any other way to stop the text from changing color in a link?

    I would really appreciate some help!
    Thanks
    Dick Roose
    Last edited by vinyl-junkie; 02-17-2008 at 10:45 AM. Reason: Added code tags

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: about links

    Are you running a web server from your PC, or is this a page on your web host's web server? If the latter, post links to both GettingStarted.html and GettingStarted2.html.

    As for your CSS, here's how that needs to look:

    Code:
    a:link { text-decoration: none color: black }; /* for unvisited links */
    a:visited { text-decoration: none color: black }; /* for visited links */ 
    a:hover { text-decoration: none color: black }; /* when mouse is over link */
    a:active { text-decoration: none color: black }; /* when link is clicked */
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: about links

    ...or you may wish to have it like this:
    Code:
    a:link,a:active,a:visited,a:hover{ text-decoration: none color: black };



Tags for this Thread