chestertb
12-23-2003, 10:40 PM
Hi,
Have run into a bit of a wall with changing font colours.
My font sttributes are set using CSS as follows;
A:link {
color: #948578;
background-color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}
A:visited {
color: #948578;
background-color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}
A:hover {
color:#2C5163;
background-color:#FFFFFF;
text-decoration:none;
font-weight: bold;
}
A:active {
color: #2C5163;
background-color:#FFFFFF;
text-decoration:none;
font-weight: bold;
}
The HTML that contains those links is as follows;
<a href="JavaScript:getit(3,1)">The US$6.90<br />
Economy Plan</a><br />
<br />
<a href="JavaScript:getit(3,2)">The US$9.90<br />
Deluxe Plan</a><br />
<br />
<a href="JavaScript:getit(3,3)">The US$16.90<br />
Luxury Plan</a><br />
<br />
<a href="JavaScript:getit(3,4)">Take This One<br />
To The Checkout</a><br />
It works just fine... in that the font colour for the active link is set on click without javascript. However, when the page first loads, I default the selection to the first option.
Can I tell the browser to treat the first link as active? If not, any suggestions on how can I change the font colour for the first option to the "active" colour, and then have it revert to the CSS when another option is selected?
Thanks
CTB
Note... I have posted a version of this under Javascript as well... perhaps that's a better way to achieve the desired result.
Have run into a bit of a wall with changing font colours.
My font sttributes are set using CSS as follows;
A:link {
color: #948578;
background-color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}
A:visited {
color: #948578;
background-color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}
A:hover {
color:#2C5163;
background-color:#FFFFFF;
text-decoration:none;
font-weight: bold;
}
A:active {
color: #2C5163;
background-color:#FFFFFF;
text-decoration:none;
font-weight: bold;
}
The HTML that contains those links is as follows;
<a href="JavaScript:getit(3,1)">The US$6.90<br />
Economy Plan</a><br />
<br />
<a href="JavaScript:getit(3,2)">The US$9.90<br />
Deluxe Plan</a><br />
<br />
<a href="JavaScript:getit(3,3)">The US$16.90<br />
Luxury Plan</a><br />
<br />
<a href="JavaScript:getit(3,4)">Take This One<br />
To The Checkout</a><br />
It works just fine... in that the font colour for the active link is set on click without javascript. However, when the page first loads, I default the selection to the first option.
Can I tell the browser to treat the first link as active? If not, any suggestions on how can I change the font colour for the first option to the "active" colour, and then have it revert to the CSS when another option is selected?
Thanks
CTB
Note... I have posted a version of this under Javascript as well... perhaps that's a better way to achieve the desired result.