Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 21st, 2005, 10:55 AM   #1
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 242
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
Arrow CSS question on alink, vlink, and link

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
melbolt is offline   Reply With Quote
Old Feb 21st, 2005, 12:33 PM   #2
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 242
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
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>
melbolt is offline   Reply With Quote
Old Feb 21st, 2005, 3:51 PM   #3
Lance
Programmer
 
Lance's Avatar
 
Join Date: Oct 2004
Location: Chicago, IL USA
Posts: 74
Rep Power: 4 Lance is on a distinguished road
Send a message via AIM to Lance
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";
Lance is offline   Reply With Quote
Old May 6th, 2005, 12:52 PM   #4
kerriganm
Newbie
 
kerriganm's Avatar
 
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0 kerriganm is on a distinguished road
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
}
kerriganm is offline   Reply With Quote
Old May 6th, 2005, 2:39 PM   #5
MonkeyRevolution
Programmer
 
MonkeyRevolution's Avatar
 
Join Date: Apr 2005
Location: In the toaster. Shh!
Posts: 57
Rep Power: 4 MonkeyRevolution is on a distinguished road
Send a message via AIM to MonkeyRevolution Send a message via MSN to MonkeyRevolution Send a message via Yahoo to MonkeyRevolution
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.
MonkeyRevolution is offline   Reply With Quote
Old May 6th, 2005, 3:01 PM   #6
kerriganm
Newbie
 
kerriganm's Avatar
 
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0 kerriganm is on a distinguished road
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
kerriganm is offline   Reply With Quote
Old May 6th, 2005, 3:03 PM   #7
MonkeyRevolution
Programmer
 
MonkeyRevolution's Avatar
 
Join Date: Apr 2005
Location: In the toaster. Shh!
Posts: 57
Rep Power: 4 MonkeyRevolution is on a distinguished road
Send a message via AIM to MonkeyRevolution Send a message via MSN to MonkeyRevolution Send a message via Yahoo to MonkeyRevolution
lol, happens to everyone, mate
__________________
I had a dream that Triumph the Insult Dog owned Microsoft...

How...appropriate.
MonkeyRevolution is offline   Reply With Quote
Old May 6th, 2005, 3:10 PM   #8
kerriganm
Newbie
 
kerriganm's Avatar
 
Join Date: Apr 2005
Location: Vallejo, CA
Posts: 15
Rep Power: 0 kerriganm is on a distinguished road
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.
kerriganm is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:17 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC