How do I override a global setting for a specific CSS attribute? For example, I have a default declaration of
a:link { color: Orange; }
but I have a specific declaration of
.c4 { background-image: url("bg2.jpg"); }
to which I want to override the "a:link" declaration color to "Black".
How do I do this? TIA
<a href="www.google.com" style="color: black;">Google Website</a>
How do I override a global setting for a specific CSS attribute?
For example, I have a default declaration of
a:link { color: Orange; }
but I have a specific declaration of
.c4 { background-image: url("bg2.jpg"); }
to which I want to override the "a:link" declaration color to
"Black". How do I do this? TIA
In Message: <MPG.39e9313af4275cbc9896f0@news.eternal-september.org>
Mike Copeland <mrc2323@cox.net> wrote:
How do I override a global setting for a specific CSS attribute?
For example, I have a default declaration of
a:link { color: Orange; }
but I have a specific declaration of
.c4 { background-image: url("bg2.jpg"); }
to which I want to override the "a:link" declaration color to
"Black". How do I do this? TIA
Specificity - CSS: Cascading Style Sheets | MDN https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Presuming html is something similar:
<a href="/" class="c4">:link class c4</a>
One of many possibilities:
a:link.c4 { color:black; }
James Kirk <noneya.invalid@gmail.com> wrote on 09 Oct 2020 in comp.infosystems.www.authoring.stylesheets:ids-and-classes
In Message: <MPG.39e9313af4275cbc9896f0@news.eternal-september.org>
Mike Copeland <mrc2323@cox.net> wrote:
How do I override a global setting for a specific CSS attribute?
For example, I have a default declaration of
a:link { color: Orange; }
but I have a specific declaration of
.c4 { background-image: url("bg2.jpg"); }
to which I want to override the "a:link" declaration color to
"Black". How do I do this? TIA
Specificity - CSS: Cascading Style Sheets | MDN https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Presuming html is something similar:
<a href="/" class="c4">:link class c4</a>
One of many possibilities:
a:link.c4 { color:black; }
https://stackoverflow.com/questions/13735635/css-styling-links-using-
td.c4 a:link {
color: White;
background-color: Black;
}
My apologizes: I'm confused by these answers, and my attempts to use
the information do not work. Here's my code, which fails to apply a
"White" color to the text of Table #2. Please advise; TIA
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2 Table Test</title>
<link rel="StyleSheet" type="text/css" href="main16.css">
<style>
.body { margin: 0px 30px 120px 30px;
font-family: Courier; font-size: 1.5em; color: white;
background-color: Black;
}
.b8 {
border-color: black; border-style: outset;
border-width: 15px; font-size: 110%;
font-weight: bold; width: 100%;
}
td.idx { font-size: 75%; padding-left: 20px; }
.c3 { color: Orange; background-color: Black;); }
.c4 { color: White; background-color: Black; }
div { margin-left: 50px; margin-right: 50px; }
a:link { color: Orange; }
a:link.c4 { color: Black; }
a:visited { color: LightGreen; }
a:hover { color: LightBlue; }
a:active { color: Gray; }
</style>
</head>
<body class="body">
<div>
<h3 class="center">Table #1 - Orange Text</h3>
<table class="b8 c3">
<tr>
<td class="idx"><a href="#LPC">Item 1</a></td>
<td class="idx"><a href="#MRC">Item 2</a></td>
<td class="idx"><a href="#FAM">Item 3</a></td>
</tr>
</table>
</div>
<div>
<h3 class="center">Table #2 - White Text???</h3>
<table class="b8 c4">
<tr>
<td class="idx c4"><a href="#TAUCK2004">Picture 1</a></td>
<td class="idx c4"><a href="#CHI2007">Picture 2</a></td>
<td class="idx c4"><a href="#MED2008">Picture 3</a></td>
</tr>
</table>
</div>
</body></html>
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 87:19:49 |
Calls: | 6,658 |
Files: | 12,203 |
Messages: | 5,333,879 |