PDA

View Full Version : CSS Rule link colors?


shutterleftopen
11-06-2009, 05:05 AM
hello. the code below is for a CSS rule for a section on my page that i have that uses BuzzBoost to incorporate my blog into the page. i am trying to have the css rule also include colors for the links when active hovering and etc. .

is this possible? thanks.

.blog {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
font-style: bold;
line-height: normal;
font-weight: normal;
font-variant: normal;
color: #FFFFFF;
width: 760px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: float;
position: absolute;
top: 242px;
padding-left: 63px;
left: 388px;
height: auto;
letter-spacing: normal;
text-align: left;
vertical-align: middle;
word-spacing: normal;
float: left;
}

WotNow
11-06-2009, 06:44 AM
.blog a:hover {
colour: FF00FF;}

.blog a:active {
colour: FF0000;}

Hope this helps

Corrosive
11-06-2009, 08:20 AM
Watch the fact that you have an absolutely positioned element floated as well. Looks like you have 'gone to town' on your styles when many are either wrong or not needed.

shutterleftopen
11-06-2009, 12:47 PM
so i placed the i got from wotnow and it doesn't seem to be working.

.blog a:hover {
color: 00c0ff;}
.blog a:active {
color: FFFFFF;}

i placed it just under the style/css where you would put a regular css code..anything else? i would just highlight the link but it's coming in from buzzboost for my blog and it's all embedded into it. let me know if there's anything i'm doing wrong. thanks.

Corrosive
11-06-2009, 01:15 PM
You need the other pseudo classes; link, visited, hover and active (in that order).

shutterleftopen
11-06-2009, 06:08 PM
<title>Aspect Apparel - Home Page</title>
<style type="text/css">
<!--
#creditfooter
{
display: none;
}
.blog a:link {
color: FFFFFF;}

.blog a:visited {
color: FFFFFF;}

.blog a:hover {
color: FFFFFF;}

.blog a:active {
color: FFFFFF;}




above is what i have. still got nothing at all.

Corrosive
11-06-2009, 06:43 PM
OK, link please.

coloeagle
11-06-2009, 06:44 PM
You need to have the # in the css style.
.blog a:link {
color:#FFFFFF;}

.blog a:visited {
color:#FFFFFF;}

.blog a:hover {
color:#FFFFFF;}

.blog a:active {
color:#FFFFFF;}

WotNow
11-06-2009, 08:11 PM
You also have white as the colour for all your links.

shutterleftopen
11-06-2009, 11:59 PM
yeah i was just testing them to see if it would work and i completely forgot about the #. thanks a lot for the help.

WotNow
11-07-2009, 12:09 AM
No problem, sorry I forgot the #