Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css multicolor links for frames menu 2

Status
Not open for further replies.

paulorlowski

Programmer
Jul 10, 2001
56
0
0
US
My content area has a white background so I want blue links, red after the link has been visited. My menu frame on the left has a black background so I want white links, red after visited.

The problem is that they both links display purple after being visited.

Any ideas?

Paul Orlowski


<html>
<head>
<title>links</title>

<STYLE TYPE=&quot;text/css&quot;>
<!--
A:link { color: #blue }
A:visited { color: #red }
A.nav:link { color: #white }
A.nav:visited { color: #gray }
//-->
</STYLE>

</head>

<body>
<table>
<tr>
<td width=&quot;30%&quot; bgcolor=&quot;#000000&quot;>
<A HREF=&quot;menulink.htm&quot; CLASS=&quot;nav&quot;>menu link</A>
</td>

<td width=&quot;70%&quot; bgcolor=&quot;#FFFFFF&quot;>
<a href=&quot;contentlink.htm&quot;>content link</a>
</td>
</tr>
</table>
</body>
</html>

 
I'm no expert on CSS but I'm not sure that using #blue etc will work. Try this:

<STYLE TYPE=&quot;text/css&quot;>
<!--
A:link { color: #0000FF }
A:visited { color: #FF0000 }
A.nav:link { color: #FFFFFF }
A.nav:visited { color: #C0C0C0 }
//-->
</STYLE>
 
Thanks for offering the color conversion to the hex, but the results are the same whether I use the color name blue or the hex equivalent. I get the browser default of purple for visited links.

Paul
 
I have had a play and the following works fine for me:

<html>
<head>
<title>Test</title>

<STYLE TYPE=&quot;text/css&quot;>
<!--
A:link { color: #0000FF }
A:visited { color: #0000FF }
A:active { color: #FF0000 }
A:hover { color: #FF0000 }
A.nav:link { color: #000000 }
A.nav:visited { color: #000000 }
A.nav:active { color: #C0C0C0 }
A.nav:hover { color: #C0C0C0 }
//-->
</STYLE>

</head>

<body bgcolor=&quot;#FFFFFF&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot;>

<a href=&quot;index.htm&quot; class=&quot;nav&quot;>Home</a>

</body>
</html>

 
Check your page properties. Open a page. From the menu bar, select File>Properties. Click the Background tab. You'll see all the color choices.

If you apply a style sheet to the page, it should register all your color choices as Automatic. However, sometimes some code still remains on the page. which overrides everything. The quickest fix to removing that code is to highlight the text, select Format>Remove Formatting. Then reapply the style.
 
Thanks for the code madhouse, and thanks for the tips garridon.

I appreciate it,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top