Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newbe needs help

    I am a newbe and I have 2 problems.

    First, I have this code in my GettingStarted.html

    <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

    <!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

  • #2
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Location
    Essex, UK
    Posts
    250
    Thanks
    1
    Thanked 23 Times in 22 Posts
    First, give a meaningful title to your post. See the posting guidelines near the top of this page.

    As far as I can see the first of your snippets works OK for me.

    The second problem is a simple syntax error. You need a semicolon after 'none' in your style.
    Code:
    a:link { text-decoration: none; color: rgb(0, 0, 0) } /* for unvisited links */
    Note that it is desirable to use the a:link rather than the bare :link. This focusses your mind on the fact that, for IE6, these behaviours will only work within anchors.

    John

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    as far as the style on the link, try this:

    Code:
    <a  href="GettingStarted2.html" style="cursor:crosshair;" >NEXT</a>
    im not sure but i believe the href needs to follow the a, although i might be wrong, also its best to close the style like a basic css file would be with an ;.

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Have you tried directly accessing GettingStarted2.html in your browser? If you can't, it's obviously not there.


  •  

    Posting Permissions

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