Hi all,

I have a table having white background.and a <a> tag inside it which is invisible due to the backgroud as the color of <a> is also white in the coressponding css file.
Now when I applied css to <a> tag color in the file for changing white color, it not working in IE7 but working fine in IE6 and firefox..

Why is it so?

Thanks guys..

better change the color code..,
some colors may not supported by IE7.i hope it may be solve u the prob

A color not being supported in IE7!!! Total nonsense. Be serious!

As for the original question, seeing a bit of code might be more helpful, so we can see what you've done wrong rather than just guessing.

Echoing drjohn, seeing the code in question would help...
...but I'll take a wild stab in the dark and assume you haven't declared all anchor hyperlink styles: -

a, a:link, a:active, a:visited { color: rgb(255,0,0); }

...you may want to declare :active (when clicked) and :visited seperately.

Hope this helps.

just try something like:

a {
	font-size:80%;
	color:#000000;
	text-decoration:none;
}
a:link {
	font-size:80%;
	color:#000000;
	text-decoration:none;
}
a:visited {
	font-size:80%;
	color:#EBEBEB;
	text-decoration:none;
}
a:hover {
	font-size:80%;
	color:#666666;
	text-decoration:none;
}

just replace the colors with your own :)

--------HTML file-----

<table width="769" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
    <tr>
        <th width="594" align="center" valign="top">
            <table width="609" cellspacing="0" cellpadding="0" border="0" class="tableWhite">
                <tr>
                    <td colspan="2">Terms</td>
                </tr>
        <tr>
                    <td align="left"></td>
                    <td width="100"><a href=\"http://www.google.com\" target=\"_blank\">search here</a></td>
                </tr>
         </table>
    </th>
     </tr>
</table>

---------css file----------

table.tableWhite a {
    color: #AF9366;
}

==========

This is the code in question and is working fine IE6 and Mozilla but the <a> color is changing in IE7.

Hope this will elaborate the question..

adding to my previous post, actually this code working fine IE6 and Mozilla but the <a> color is not changing to #AF9366 in IE7.

Also after visiting the link
<a href=\"http://www.google.com\" target=\"_blank\">search here</a> in the above code.....
the link on the parent page disappears....

check your - a:visited - and dont forget to refresh your site in the browser ;)

Well, some other part of your code elsewhere is breaking the system, because I just made a test page using your code, and the colour was applied the same in FF and IE7, exactly as I expected it would.

I also stuck a link outside your table, gave it a different color and it worked too.
Do you have a sample page online where we can look and see what else is going on?

PS You are not really using tables for layout purposes, are you??? That is literally soooo last century. Tables are for tables of data, not layout control. CSS is for styling, including the size and position of divs, and thus for layout control.

Member Avatar

diafol

<table width="769" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<th width="594" align="center" valign="top">
<table width="609" cellspacing="0" cellpadding="0" border="0" class="tableWhite">
<tr>
<td colspan="2">Terms</td>
</tr>
<tr>
<td align="left"></td>
<td width="100"><a href=\"http://www.google.com\" target=\"_blank\">search here</a></td>
</tr>
</table>
</th>
</tr>
</table>


---------css file----------

table.tableWhite a {
color: #AF9366;
}

What the hell is that? A nested table in a table header cell?? Why on earth are you doing this? You use th and td without thead and tbody. I really can't see what benefit you get from the outer table - is it for layout? If so listen to the previous poster and buy a book on XHTML/CSS. Your 'a' elements should be listed correctly with LoVeHAte (link;visited;hover;active) order - listing just the a element is asking for trouble. You may find that declaring your element in full may help: table.tableWhite tr td a.

You've also backslashed your tag attributes. This isn't a js/php (etc) string to be parsed, so you don't need to do that. This could mess up a lot of things.

Sorry, I dont have a sample page online..
but I have the followiong CSS also in the style.css file in the order specified..
---------------------------------
table.tableWhite a {
color: #AF9366;
}

table.tableWhite a:link {
text-decoration: underline; color: #AF9366;
}

table.tableWhite a:visited {
text-decoration: underline; color: #AF9366;
}

a {
text-decoration: underline; color: #FFFFFF; font-family: Arial, Helvetica, sans-serif;
}

a:link {
text-decoration: underline; color: #FFFFFF;
}

a:visited {
text-decoration: underline; color: #FFFFFF;
}

a:hover {
text-decoration: underline; color: #AF9366;
}

a:active {
text-decoration: underline; color: #999999;
}
---------------------------------

Still the problem persists.... :-(

Hi All,

The problem is solved by appying the CSS to tableWhite <a> tags in LoVeHAte manner...
Thank u all ;-)