CSS: Alternate link color help.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr. X
    Senior Member
    • May 2001
    • 1112
    • 2.3.0

    CSS: Alternate link color help.

    Im redesigning my little person site, and Im using CSS do define pretty much everything, text, color, formatting etc.

    Now my header is a table with 2 rows. The 2nd row is a really dark grey, and thats where my text links to sections of my site (home, news, links etc). Since they are links, the color is way too dark, plus they are underlined.

    The CSS that defines that section looks like this:

    Code:
    .bottomheaderrow {
    	background-color: #666666;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	color: #DDDDDD;
    	letter-spacing: 2px;
    	text-align: right;
    	text-indent: 4px;
    	font-weight: normal;
    	font-style: normal;
    	padding: 2px 10px 5px 5px;
    	background-image: url(header_bottom_row_2.gif);
    The HTML that CSS is applied to is this:

    Code:
    <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0" class="headerborder">
      <tr> 
        <td class="topheaderrow">joe.pcfx.cc</td>
      </tr>
      <tr> 
        <td width="30%" class="bottomheaderrow"><a href="index.htm">home</a> - <a href="articles.htm">articles</a> 
          -<a href="downloads.htm">downloads</a> -<a href="gallery.htm">gallery</a> 
          - <a href="biography.htm">biography</a> - <a href="links.htm">links</a> 
          - <a href="faq.htm">faq</a></td>
      </tr>
    </table>
    What I would like to do is make those links #DDDDDD, no underline, and upon mouseover a hover color (dont know what yet) so lets just say #ffffff for now.

    Im just so confused as to how CSS classes and how I apply them to my CSS sheet work. Im doing the layout in Dreamweaver MX and manually editing code here and there whereas I cant do something in DWMX. Can someone please show me an example of where I can go with this?
    website: joe.pcfx.cc
    forums: pcfx.cc
    gallery: here
  • nsr81
    Member
    • Mar 2002
    • 39

    #2
    Re: CSS: Alternate link color help.

    This should do it just for the links:

    Code:
     a.nav:link { color: #DDDDDD;  text-decoration: none;  }
    a.nav:hover { color: white; }
    Then just add class="nav" in your <a> tags, i.e.
    Code:
    <a href="index.htm" class="nav">home</a>
    It can be easily done in DWMX. However I use TopStyle 3 for CSS.

    Hope that helps.

    Comment

    • _BC
      New Member
      • Oct 2002
      • 2

      #3
      Alternatively you could use
      Code:
      .bottomheaderrow a:link { color: #DDDDDD;  text-decoration: none;  }
      .bottomheaderrow a:hover { color: white; }
      This would affect all links contained with tags which have a class of bottomheaderarrow. The advantage of this method is you don't need to attach a new class on each <A>.

      Comment

      Related Topics

      Collapse

      • panzerscope
        Link Hover Transformation
        by panzerscope
        Hello,

        So I have a CSS code that changes the colour of links when hovered over, however it is interfering with other link types on my site such as my pagination buttons are being interfered...
        Mon 16 Sep '19, 10:07am
      • Zeefje
        css editor
        by Zeefje
        I'm slowly starting to make a new style based on vb 6 instead of 5 and am in the fase of making tweaks in the additional css via the site builder. after a while the lower css lines are red and don't parse,...
        Wed 8 Nov '23, 7:28am
      Working...