Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 08, 2012, 09:28:32 AM

Pages: [1]   Go Down
  Print  
Author Topic: CSS problem with link, vlink, and alink  (Read 1815 times)
bytebit
Space Explorer
***
Offline Offline

Posts: 6



WWW
« on: January 05, 2010, 01:18:46 PM »

.
I'm trying to control the properties of the links of my site pages through CSS, but with no luck.

The .css file contain the following code:

<style TYPE="text/css">
a:link    {color:#cad9e6;} /* unvisited link */
a:visited {color:#cad9e6;} /* visited link */
a:hover   {color:#cad9e6;} /* mouse over link */
a:active  {color:#cad9e6;} /* selected link */
body{
      link="#cad9e6";
      vlink="#cad9e6";
      text="black";
      alink="#cad9e6";
      background:white;
      font-family:Tahoma, Courier, serif, Georgia, Verdana;
      font-size:.90em;
      margin-left: 10%; margin-right: 10%;
}
</style>


And the files of web pages contain the following code:

<link rel="stylesheet" href="http://beadartcompany.com/beadstyles.css" type="text/css">

</head>
<body alink="#cad9e6" link="#cad9e6" vlink="#cad9e6">


If I did not include - alink="#cad9e6" link="#cad9e6" vlink="#cad9e6"  in the BODY tag of individual pages, the links do not have the desired effects from using the .css file alone.   What am I doing wrong? 

Thanks for your assistance. David

Logged

Happiness is accepting and adjusting to the inevitable changes in life.
wektech
Master Jedi
*****
Offline Offline

Posts: 1031



WWW
« Reply #1 on: January 05, 2010, 02:41:05 PM »

Try taking the style tags off of your style sheet. Your browser knows it contains style statements, you do not need to tell it. Your style sheet should look like this:
Code:
a:link    {color:#cad9e6;} /* unvisited link */
a:visited {color:#cad9e6;} /* visited link */
a:hover   {color:#cad9e6;} /* mouse over link */
a:active  {color:#cad9e6;} /* selected link */
body{
      text="black";
      background:white;
      font-family:Tahoma, Courier, serif, Georgia, Verdana;
      font-size:.90em;
      margin-left: 10%; margin-right: 10% }

Logged

Pages: [1]   Go Up
  Print  
 
Jump to: