473,396 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CSS Link Color within a Style

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>
Sep 3 '08 #1
4 2904
In article
<f9**********************************@z11g2000prl. googlegroups.com>,
Albert <al****@netmation.comwrote:
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
Sep 3 '08 #2
In our last episode,
<f9**********************************@z11g2000prl. googlegroups.com>, the
lovely and talented Albert broadcast on comp.infosystems.www.authoring.html:
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}

><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/us****@larseighner.com
Love: The warm feeling you get towards someone who meets your neurotic needs.
Sep 3 '08 #3
Albert wrote:
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
Sep 3 '08 #4
On Tue, 2 Sep 2008, Albert wrote:
<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/
Sep 3 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mark | last post by:
Hi - in my current pages, I have: <link href="styles.css" rel="stylesheet" type="text/css"> What I would like to do is: <!--#include file="config.asp" --> <!--#include file="styles.asp" --> ...
7
by: LRW | last post by:
Below I'll paste my CSS and the HTML in question. But what's happening is, I'm trying to establish a link behavior for a class that's separate from the normal link class. I've established a: 's...
5
by: Dave Mausner | last post by:
the html 4.01 standard says i can use: <link type="text/css" href=file-name> to include a style section. questions: 1. does the external style sheet have to contain <html> ... </html>? 2. does...
5
by: Janet | last post by:
The following html code appears in an ASP page. The hyperlink is set to white (see the page link color), but when the page renders in IE 6.0, it initially appears in maroon with a white border...
3
by: news | last post by:
I have a site that pulls half its content from a database. Text that will have links in it, that I won't be able to alter. They'll all be like <a href="link">blah</a> But I want to give links...
3
just a feeling
by: just a feeling | last post by:
Hi, Though my problem seems simple, I didn't find the sol. a:link doesn't look as it should be in my browser (IE6) i.e the link is displayed in the text's default color (I guess it's purple)...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
14
by: issentia | last post by:
I'm working on this site: http://www.essenceofsoy.com/redesign/index2.html and I'm having a few problems with getting the layout exactly right. 1) When the menu items are rolled over, they...
9
by: skultetc | last post by:
Hey all, I have a div displayed as a block with an onclick event that shows/ hides a different div underneath it. There is a link within the first div that takes the user to a different page. My...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.