Click to See Complete Forum and Search --> : CSS works in preview but not on website


TJJ
04-21-2003, 01:33 PM
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.

Daria
04-21-2003, 01:52 PM
Did you remember to upload your CascadeMenu.css along with your page?

TJJ
04-21-2003, 01:56 PM
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.

AdamGundry
04-21-2003, 02:02 PM
Put this CSS below the code for the anchor class:

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

Adam

TJJ
04-21-2003, 02:05 PM
Novice.

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

Daria
04-21-2003, 02:06 PM
I woul just suggest instead of color:blue put color:black - it would be more visible on the skyblue background

Daria
04-21-2003, 02:09 PM
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.

AdamGundry
04-21-2003, 02:14 PM
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.

TJJ
04-21-2003, 02:15 PM
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
??

Daria
04-21-2003, 02:17 PM
doesn't matter

That superdark blue and white you just put in look good in contrast.

Daria
04-21-2003, 02:20 PM
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.

TJJ
04-21-2003, 02:49 PM
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;}

Daria
04-21-2003, 03:04 PM
YES

TJJ
04-21-2003, 04:04 PM
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