Not working in firefox

Hi i have this code below that hyperlinks a cell. This works on ie but not in firefox, is there a fix for this?

<a href=‘new.php’><td width=‘87.5’ class=‘btmbtn’ align=‘center’><b>NEW</b></td></a>

Cause it shouldn’t work. What do you want it to do?

An <a …> tag can only contain text and inline elements (like <b>, <em>, <span> and so on). It can’t contain table or block elements. You need to put the <a …> inside the <td>.

If you want to make the clickable area extend to the full width of the cell, then in the CSS you need
td a {display:block;}

And, looking from another angle, you can only have <th> or <td> elements inside <tr>:

<!ELEMENT TR - O (TH|TD)+ – table row –>

Your code probably looks something like this:

<tr>
<td>...</td>
[COLOR="Red"]<a href='new.php'>[/COLOR]<td width='87.5' class='btmbtn' align='center'><b>NEW</b></td>[COLOR="red"]</a>[/COLOR]
</tr>

when, in fact, like Stevie said, it should look like this:

<tr>
<td>...</td>
<td width='87.5' class='btmbtn' align='center'>[COLOR="Blue"]<a href='new.php'>[/COLOR]<b>NEW</b>[COLOR="Blue"]</a>[/COLOR]</td>
</tr>

Once again, validate your code before posting a problem. It may be that by doing so your problem may solve by it self :slight_smile:

ok guys thanks got it working,

below is my css code how would i make the hyperlink different colours for btmbtn?


body {
	margin: 0;
	padding: 0;
	background-image: url(../images/121bg.jpg);
	background-attachment: fixed;
	font-family: arial;
	font-size: 12px;
	color: #000000;
}
.navbar { 
color:#0000FF; 
}
table { 
  border: 0; 
} 
.subheader { 
background-color: grey;
	font-family: arial;
	font-size: 12px;
} 
.btmbtn { 
	background-image: url(images/btmbtn.jpg);
	font-family: arial;
	font-size: 12px;
} 
p { 
  position:absolute; 
  bottom:2px; 
  cursor: pointer;
} 
a:link {
	text-decoration: none;
	color: #0154a0;
}

a:visited {
	text-decoration: none;
	color: #0154a0;
}

a:active {
	text-decoration: none;
	color: #0154a0;
}

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





.btmbtn a:link {

  color: #ABCDEF;

}


yes this <td width=‘87.5’ class=‘btmbtn’ align=‘center’><a href=‘new.php’><b>NEW</b></a></td> code will work fine If you want to hyperlink the text inside your cell.
infact you cant hyperlink the whole td.