Connecting Tech Pros Worldwide Help | Site Map

CSS Link Color within a Style

  #1  
Old September 3rd, 2008, 03:15 AM
Albert
Guest
 
Posts: n/a
In the code below how can I set specific Link Color attributes that
will only work within .style2 ?

<style type="text/css">
<!--
body {
background-image: url(images/rep_1.jpg);
margin-top: 35px;
}
a:link {
color: #333333;
}
a:visited {
color: 333333;
}
a:hover {
color: #CCCCCC;
background-color: #333333;
text-decoration: none;
}
a:active {
color: #333333;
}
..style2 {
font-size: 12px;
color: #999999;
}
-->
</style>
  #2  
Old September 3rd, 2008, 03:35 AM
dorayme
Guest
 
Posts: n/a

re: CSS Link Color within a Style


In article
<f96ca46a-c8bf-4b82-8f43-1b297c2286a4@z11g2000prl.googlegroups.com>,
Albert <albert@netmation.comwrote:
Quote:
In the code below how can I set specific Link Color attributes that
will only work within .style2 ?
>
<style type="text/css">
<!--
body {
background-image: url(images/rep_1.jpg);
margin-top: 35px;
}
a:link {
color: #333333;
}
a:visited {
color: 333333;
}
a:hover {
color: #CCCCCC;
background-color: #333333;
text-decoration: none;
}
a:active {
color: #333333;
}
.style2 {
font-size: 12px;
color: #999999;
}
-->
</style>
You can try

..style2 a:link {...}
..style2 a:visited {...}

etc

--
dorayme
  #3  
Old September 3rd, 2008, 03:35 AM
Lars Eighner
Guest
 
Posts: n/a

re: CSS Link Color within a Style


In our last episode,
<f96ca46a-c8bf-4b82-8f43-1b297c2286a4@z11g2000prl.googlegroups.com>, the
lovely and talented Albert broadcast on comp.infosystems.www.authoring.html:
Quote:
In the code below how can I set specific Link Color attributes that
will only work within .style2 ?
You could ask this in the CSS group, you know.

..style2 a:link {stuff}
..style2 a:hover {stuff}
..style2 a:visited {stuff}
..style2 a:active {stuff}



Quote:
><style type="text/css">
><!--
body {
background-image: url(images/rep_1.jpg);
margin-top: 35px;
}
a:link {
color: #333333;
}
a:visited {
color: 333333;
}
a:hover {
color: #CCCCCC;
background-color: #333333;
text-decoration: none;
}
a:active {
color: #333333;
}
.style2 {
font-size: 12px;
color: #999999;
}
-->
></style>
--
Lars Eighner <http://larseighner.com/usenet@larseighner.com
Love: The warm feeling you get towards someone who meets your neurotic needs.
  #4  
Old September 3rd, 2008, 04:35 AM
Jonathan N. Little
Guest
 
Posts: n/a

re: CSS Link Color within a Style


Albert wrote:
Quote:
In the code below how can I set specific Link Color attributes that
will only work within .style2 ?
>
<style type="text/css">
<!--
^^^

BTW there is *no* reason to use html comments within your style element.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  #5  
Old September 3rd, 2008, 02:55 PM
Andreas Prilop
Guest
 
Posts: n/a

re: CSS Link Color within a Style


On Tue, 2 Sep 2008, Albert wrote:
Quote:
<style type="text/css">
<!--
It is really nice that you care about readers with Netscape 2!
But many readers now have already Netscape 3 - and Netscape 3
doesn't need these silly pseudo-comments any more.
Try also Netscape 3!

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting HyperLinkField visited color, how?? Jeff answers 8 April 19th, 2007 03:05 PM
link underline and no underline how to? jmaxsherkimer answers 29 July 23rd, 2005 11:09 PM
link css declarations? Dave Mausner answers 5 July 20th, 2005 09:27 PM
Linking Style Sheets Luke Bellamy answers 2 July 20th, 2005 09:00 PM