[thelist] Different link attributes with css

Russell Griechen russgri at bellsouth.net
Tue Nov 6 08:01:53 CST 2001


The only way i've found that works if if I put some
> thing like
> a.classname:hover{color:red}
> but this requiresthat I put the class statment in each link, I'd like to
> beable to just have the div that makes up the menu have something in its
> class.

Here is a solution...you can assign a class to a div and then wrap the file
in that div:
I have a file named 10alpha.html and I want the links a different
color...green... and size...18px

a:link{font-family: Arial;
    color:#0000dd;font-size:12px;line-height:16px;
    font-weight:800;text-decoration:underline;}
a:visited{font-family: Arial;
    color:#0000dd;font-size:12px;line-height:16px;
    font-weight:800;text-decoration:underline;}
a:hover{font-family: Arial;
    color:#0000dd;background:#fff;font-size:12px;
    font-weight:800; text-decoration:underline;line-height:16px;}
a:active{font-family: Arial;
    color:#FF0000;font-size:12px;line-height:16px;
    font-weight:800;text-decoration:underline;}

.10alpha{border-left:1px solid #0000c8;
    font-family: verdana;
    width:100%;
   vertical-align: middle; text-align: center;}
div.10alpha a:link{
    font-size: 18px; font-weight:600;
    color:green;
    text-decoration:underline;}
div.10alpha a:visited{
    font-size: 18px; font-weight:900;
    color:green;
    text-decoration:underline;}
div.10alpha a:hover{
    font-size: 18px; font-weight:900;
    color:green;background:white;
     text-decoration: underline; }
div.10alpha a:active{
    font-size: 18px; font-weight:900;
    color:#ff0000 ;
    text-decoration:underline}

And in the body of 10alpha.html

<div align="center"class="10alpha" style="position:relative;top:-6px;">
<a href="11links.html#a">A</a>
<a href="11links.html#b">B</a>
<a href="11links.html#c">C</a>
<a href="11links.html#d">D</a>
</div>

Russell Griechen







More information about the thelist mailing list