Hi Skip,
Firstly, you'll save yourself a lot of coding if you trim those rules
down a little. As you styling the general 'a' tag, then when styling
a:hover etc, then you only need to add definitions for the changed
styles. Also, since styling a:visited is not need when styling the
general 'a' tag (a:visited, a:hover et al will all automatically have
the general style until changes). eg:
a.pagelink {
display: block;
width: 6em;
padding: .2em;
line-height: 1.4em;
background-color: #47afe2;
border: 1px solid black;
color: #000;
text-decoration: none;
text-align: center;
}
a.pagelink:hover {
background-color: #369;
color: #ffffff;
}
Also, not the the soltuion to your problem... you were defining a style
that target a link tag inside an element with the class 'shoplogo', not
a link with the class of shoplogo.
.shoplogo a {} -> <div class="shoplogo"><a href="">my link</a></div>
a.shoplogo {} -> <a class="shoplogo">a link</a>
Thanks,
David.
Skip Evans wrote:
Hey all,
I'm a PHP/MySQL coder by trade, hence a bit green
with CSS, as this question will show.
I have two sets of style elements to style two
different kinds of links, as the code below shows.
.shoplogo a, a:visited {
border: none;
color: #000;
background-color: #b9e4ff;
text-decoration: none;
}
.shoplogo a:hover {
border: none;
color: #000;
background-color: #b9e4ff;
text-decoration: none;
}
.pagelink a, a:visited {
display: block;
width: 6em;
padding: 0.2em;
line-height: 1.4;
background-color: #47afe2;
border: 1px solid black;
color: #000000;
text-decoration: none;
text-align: center;
}
.pagelink a:hover {
display: block;
width: 6em;
padding: 0.2em;
line-height: 1.4;
background-color: #369;
border: 1px solid black;
color: #ffffff;
text-decoration: none;
text-align: center;
}
And then I have code in an html file with the
following two lines, in different places.
<td align="center" valign="top"><a
class="shoplogo" href="http://shopstudios.com">
<img src="images/ShoTV-1.jpg"
border="0"></a>
</td>
<td align="center" valign="top"><a
href="fashion.html" class="pagelink">FASHION</a></td>
The problem is that both links take on the
properties of whatever style set, or specs for the
links, is listed last in the CSS file.
I would think since they have separate names, that
each would adhere to the properties of the one
they are called by.
I know to all of you this is trivial and you're
rolling your eyes, but I'm a bit confused.
Thanks,
Skip
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************