MDanz Posted September 28, 2009 Share Posted September 28, 2009 <a href='http://www.u-stack.com/display.php?id=$id' style='text-decoration: none'><tr><td width='330px' height='103px' background='$image' VALIGN='middle' style='border: 1px solid #99731E;'> <font color='#FF6600' size='6' face='Arial'><center><strong>$newname\n</strong></center></font><br></td></tr></a> i don't see why this isn't working heres my website.. an example.. when i put mouse over any of the results, no hyperlink? http://www.u-stack.com/ustack.php?search=MDanz&submit=Go! Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 28, 2009 Share Posted September 28, 2009 This is NOT a PHP issue, this is basic HTML. The fact that you are using PHP to create the hyperlink is irrelevant to the issue. [Moved post to HTML forum] You cannot put a hyperlink around a table element. It seems to work in IE (except the hand icon doesn't appear on mouseover), but IE tends to be very forgiving of coding errors. By your use of FONT tags (which have been deprecated for years) I think you need a refresher on HTML coding. Assuming you are using PHP to echo the hyperlink, try this: echo "<tr>\n"; echo "<td width=\"330px\" height=\"103px\" background=\"{$image}\" valign=\"middle\""; echo " style=\"border:1px solid #99731E;color:#FF6600;font-family:Arial, Sans-serif;font-size:16pt;font-weight:bold;text-align:center;\">\n"; echo "<a href=\"http://www.u-stack.com/display.php?id={$id}\" style=\"text-decoration: none\">{$newname}</a>\n"; echo "</td>\n"; echo "</tr>\n"; Or, better yet, create a class for the td style properties. Quote Link to comment Share on other sites More sharing options...
sawade Posted September 28, 2009 Share Posted September 28, 2009 You can not nest block elements. Think about it like reading a book, you don't put a paragraph inside another paragraph. You put sentences inside a paragraph, sentences representing inline elements. With that... table is block, a is inline. So <table> <tr> <td><a href="">text</a></td> </tr> </table> You may want to move your styles into CSS either external or internal, whatever your preferece. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.