| fizzycream 2007-03-12, 4:05 am |
| Hey, I'm new to everything about HTML and CSS, and I had a few questions...
First, I'm using pseudo classes for active, visited, hover, and links... This is how I typed it in my style sheet:
a:link {color: #cd0202}
a:visited {color: blue}
a:hover {color: black}
a:active {color: #666666}
I have already visited all my links, so I'm not sure if the a:link works because the links automatically show up as blue. The hover works, but the active doesn't... I've been to so many sites, and they all have the same thing as me, except nobody shows WHERE in the style sheet to put it. When I put it in the links section it didn't work at all, so I put it at the very very end. This is what my whole style sheet looks like:
.header {
/*Start Position CSS*/
position: absolute;
top: 0px;
height: 150px;
left: 0px;
right: 0px;
padding: 20px 0px 0px 20px;
/*End Position CSS*/
font-family:scriptina;
font-size: 320%;
color: #e1ca0a;
text-align: center;
vertical-align: middle;
white-space: nowrap;
border-bottom-color: #cd0202;
border-bottom-style: solid;
border-bottom-width: medium;
background-image:url(header1.jpg);
background-repeat: repeat-x
}
.maintext {
/*Start Position CSS*/
position: absolute;
top: 150px;
left: 160px;
right: 0px;
padding: 20px 40px 20px 40px;
/*End Position CSS*/
font-family: tahoma;
}
body {
background-color: #e1ca0a;
}
.links {
/*Start Position CSS*/
position: absolute;
top: 150px;
left: 0%;
width: 150px;
bottom: 0px;
padding: 10px 5px 10px 5px;
/*End Position CSS*/
border-right-color: #cd0202;
border-right-style: solid;
border-right-width: medium;
display: block;
text-align: center;
font: 1em tahoma;
color: #cd0202;
}
h1 {
color: #cd0202;
font:bold 1em tahoma
}
a:link {color: #cd0202}
a:visited {color: blue}
a:hover {color: black}
a:active {color: #666666}
is that wrong??? I don't get why the active doesn't work? And I don't even know if the link works... because they all show up as visited.
Also, my second question, is I changed my background colour and put it under body, and it's great, fills the whole bottom of the page and whatnot, links and everything. But if I add a background colour to links it makes my border disappear :S...
Thanks in advance! |