www.webdeveloper.com
Results 1 to 14 of 14

Thread: CSS works in preview but not on website

  1. #1
    Join Date
    Apr 2003
    Posts
    46

    CSS works in preview but not on website

    When I run the 'Preview' function on FrontPage 2002 the CSS works fine. When I publish to my site http://www.optioncaddie.com/test.htm it has errors.

    I am a novice and can't figure it out.

  2. #2
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    Did you remember to upload your CascadeMenu.css along with your page?
    Absence of a result is a result, unless defined otherwise.

  3. #3
    Join Date
    Apr 2003
    Posts
    46
    No, I did not. As I said, novice.

    Now how do I change the font color and the color the background changes to when the cursor goes over a link? It is so badly colored you can't read the links.

  4. #4
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    Put this CSS below the code for the anchor class:

    a:hover {
    color: blue;
    background-color: red;
    }

    Adam

  5. #5
    Join Date
    Apr 2003
    Posts
    46
    Novice.

    What is or where is "below the code for the anchor class:"

  6. #6
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    I woul just suggest instead of color:blue put color:black - it would be more visible on the skyblue background
    Absence of a result is a result, unless defined otherwise.

  7. #7
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    Try this: put this into your *.css stylesheet:

    a.nav {color: black;}
    a.nav:hover {color: red;background-color: grey;}



    Then edit your link reference (for example, for Refco Express, in your html as follows:

    <a TARGET="_blank" href="http://www.futuresorders.com/refco/cgi-bin/GetFrames" class="nav">

    see what happens.
    Absence of a result is a result, unless defined otherwise.

  8. #8
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    Yes, if you want to apply it to all links automatically do this:

    a {color: black; background-color: transparent;}
    a:hover {color: red;background-color: grey;}

    The section starting "a" is what I meant by "the code for the anchor class".

    Adam

    P.S. I know red/blue is an awful colour scheme, but I just needed some colour constants to demonstrate the use of the code.

  9. #9
    Join Date
    Apr 2003
    Posts
    46
    Ok. I know what the *.css is but where exactly do I put

    a.nav {color: black;}
    a.nav:visited {color: black;}
    a.nav:hover {color: red;background-color: grey;}

    After BODY
    After .menuBar
    ??

  10. #10
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    doesn't matter

    That superdark blue and white you just put in look good in contrast.
    Absence of a result is a result, unless defined otherwise.

  11. #11
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    AdamGundry is right: what I've suggested will change only links with class="nav", leaving you an option of having unclussified links to appear standard.

    If you use what AdamGundry suggested, you'll get uniformed links (that unclussified) by default throughout your document.

    I agree that red/blue is an awful combination, which is also constantly abused, but it's good to play with.
    Absence of a result is a result, unless defined otherwise.

  12. #12
    Join Date
    Apr 2003
    Posts
    46
    So I add this anywhere to the *.css file to change colors?

    a {color: black; background-color: transparent;}
    a:hover {color: red;background-color: grey;}

  13. #13
    Join Date
    Nov 2002
    Location
    NJ, USA
    Posts
    785
    YES
    Absence of a result is a result, unless defined otherwise.

  14. #14
    Join Date
    Apr 2003
    Posts
    46
    OK. Got the colors working and now the menu drop down stays down even when the cursor isn't on the link.

    http://www.optioncaddie.com/test.htm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles