Forum Moderators: open
BUT it only happens on images with an <A> tag around them
I've added the block tag in the css, I have to leave the doctype as it is - if I take it out one of my javascripts stops working
Its fine in IE on pc - actually the problem is NS6 on mac - I havent tested NS6 on pc yet - but this is such a weird error someone must have come across it.
here's a cutdown of the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="_css/style2.css" type="text/css">
<script type="text/javascript" language="JavaScript" src="_script/ro_global.js"></script>
<script type="text/javascript" language="JavaScript" src="_script/pop_preload.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" >
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#00FF33">
<tr><td><img src="images/tlwhat.gif" alt="" width=16 height=27></td><td colspan=5><img src="images/b1.gif" alt="" width=178 height=27></td><td rowspan=3><img src="images/logo.gif" alt="r" width="489" height="79" border="0"></td><td><img src="images/trwhat.gif" alt="" width=17 height=27></td></tr>
<tr><td bgcolor="#000000"><img src="images/spacer.gif" alt="" width="16" height="35"></td><td><a href="pic_page.html"><img src="images/pic_n.gif" alt="g" name="pic" width="34" height="35" border="0" id="pic"></a></td><td><a href="search.html"><img src="images/srch_n.gif" alt="g" name="srch" width="36" height="35" border="0" id="srch"></a></td><td><a href="spk_page.html"><img src="images/spk_n.gif" alt="h" name="spk" width="36" height="35" border="0" id="spk"></a></td><td><a href="#"><img src="images/txt1_n.gif" alt="h" name="txt1" width="36" height="35" border="0" id="txt1"></a></td><td><a href="#"><img src="images/txt2_n.gif" alt="he" name="txt2" width="36" height="35" border="0" id="txt2"></a></td><td bgcolor="#000000"><img src="images/spacer.gif" alt="" width="1" height="1"></td></tr>
<tr><td colspan=6><img src="images/b3.gif" alt="" width=194 height=17></td></tr>
</table>
</body>
</html>
and here's the shortened css:
body, p, td {
color: #333;
font-family:Arial, Helvetica, Verdana, sans-serif;
font-size: 1em;
line-height:1.2;
}
td>img {
display: block;
}
thanks for any ideas!
...it only happens on images with an <A> tag around them
Then your perhaps your CSS rule should state that explicitly:
a:link > img {
display:block;
margin:0;
padding:0;
border:0;
}
Second thoughts - perhaps some img links are not direct children but some further generation - so you need to use a contextual selector, not the child selector, so the rule carries down into the deeper structure
td img {
display: block;
margin:0;
padding:0;
border:0;
}