SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    classes, tables and links that don't look like I want

    Hi,

    I am trying to get my links within a table to display white on a coloured background, and coloured on the white backgroung within a table using classes. What happens is the links are in IE (it's for an intranet, where all users have IE5) default colours, not what I specified. The styles are in a linked sheet, and I would like to keep it that way.

    Code:
    <html>
    <head>
    <title></title>
    <link rel="stylesheet" href="/styles/default.css" type="text/css">
    </head>
    <body>
    <table>
    <tr>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" width="518" class="news">
    <tr>
    <td>news stuff</td>
    </tr>
    </table>
    </td>
    <td valign="top">
    <table class="rightnav">
    <tr>
    <td>rightnav stuff</td>
    </tr>
    </table>
    </table>
    </body>
    and the stylesheet:

    Code:
    .rightnav {
    	line-height : 150%;
    	font-family : Arial, Helvetica, sans-serif;
    	color : White;
    	background-color : #ce6700;
    }
    
    .news {
    	font: 12px;
    	font-family: Arial, Helvetica, sans-serif;
    }
    
    A.news {
    	color: #ce6700;
    }
    
    
    A.rightnav {
    	color : White;
    }
    Thanks in advance

    Joe
    Gravity always wins

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to specify the initial link properties like so:
    Code:
    a { properties }
    :hover { properties }
    :active { properties }
    :visited { properties }
    Doing that will set the inital colors/properties for you.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That changed all of them. It did not apply the class styles.
    Gravity always wins

  4. #4
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by NZ Joe
    That changed all of them. It did not apply the class styles.
    Originally posted by Aes
    ... Doing that will set the inital colors/properties for you.
    Then do something like this:
    Code:
    a { properties for outside table }
    :hover { properties for outside table }
    :active { properties for outside table }
    :visited { properties for outside table }
    td.a { properties for inside table }
    td.:hover { properties for inside table }
    td.:active { properties for inside table }
    td.:visited { properties for inside table }
    Last edited by Aes; Jan 23, 2002 at 18:11.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  5. #5
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are 2 different tables, for which there needs to be 2 different colours. That only lets me use 1.
    Gravity always wins

  6. #6
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After trying many different solutions, I stumbled across one that worked. I changed the a.rightnav and a.news to:
    Code:
    table.news a{
    	color: #ce6700;
    }
    
    
    table.rightnav a{
    	color : White;
    }
    Gravity always wins


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •