![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
Hello, i'm trying to incorporate the alink, vlink, and link into my CSS, i'm not quite sure how to do that though.
currently my page was like follows <body bgcolor=#e7d693 alink=green vlink=green link=green> i wanted to put this into my CSS, so far i have
<style>
Body
{
background-Color: #e7d693;
a:link {color:green};
a:visited {color:green};
a:hover {color:green};
a:active {color:green};
}
</style>now for my body tag i have <body class="Body"> the background color works, but the link colors aren't working, what am i doing wrong? thanks |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
nevermind, i figured it out.
<style>
Body{background-Color: #e7d693}
a:link{color:green}
a:visited{color:green}
a:hover{color:green}
a:active{color:green}
</style>in the html it would just be <Body> |
|
|
|
|
|
#3 |
|
Programmer
|
Now if you wanted to be uber-efficient, you'd code it this way:
body {
background: #e7d693;
}
a:visited,
a:link,
a:hover, /* not necessary since hover is undefined by default */
a:active {
color: green;
}The less code you write, the less characters are being transfered to the user agent. That way, the browser does more work rendering and reading CSS (slightly more) and your server sends less data. Just a random post, really. Just felt like improving your immense amount of {color: green}. :p
__________________
/* LANCE */ C++; /* this makes C bigger but returns the old value */ char *site = "slackwise.net", *home = "lance.slackwise.net", *pics = "flickr.com/photos/slackwise"; |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0
![]() |
This isn't working for me. What's wrong?
.style1 { FONT-SIZE: 7pt; COLOR: #000000; a:link{color: #0000FF}; a:visited{color: #4A4A93}; a:hover{color: #D9203F}; a:active{color: #9A20D9}; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; LETTER-SPACING: -0.055em } |
|
|
|
|
|
#5 |
|
Programmer
|
do you have <STYLE TYPE="text/css"> </style> tags goin down?
Also, I haven't tested it out quite yet, but I'm wondering if the space after "color:" is what's giving you trouble...
__________________
I had a dream that Triumph the Insult Dog owned Microsoft... How...appropriate. |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0
![]() |
I'm a dufus. The <span style> and <a href> tags were nested incorrectly. Thank you so much for your help. I implemented your suggestions anyway! :o
|
|
|
|
|
|
#7 |
|
Programmer
|
lol, happens to everyone, mate
![]()
__________________
I had a dream that Triumph the Insult Dog owned Microsoft... How...appropriate. |
|
|
|
|
|
#8 |
|
Newbie
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0
![]() |
Okay, yes I am a dufus, but it still didn't work. I had to take the link styles out of the stylesheet and put them at the top of the page I was working on. NOW it works.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|