[thelist] simple css help

Christian Heilmann codepo8 at gmail.com
Fri Oct 28 17:45:21 CDT 2005


> Hello,
> try better this ;)
> <html>
> <head>
> <script type="text/javascript">
> function chgCol(obj,color1,color2)
> {
> obj.style.backgroundColor=color1;
> obj.style.color=color2;
> }
> </script>
> </head>
> <body>
> <table border="1" id="something">
> <tr>
> <a href="foo" id="link"><td onmouseover="chgCol(this,'black','white')"
> onmouseout="chgCol(this,'white','black')"><br /><br />Foo</a><br /><br
> /></td></a>
> <a href="foo" id="link"><td onmouseover="chgCol(this,'black','white')"
> onmouseout="chgCol(this,'white','black')"><br /><br />Foo</a><br /><br
> /></font></td></a>
> </tr>
> </table>
> </body></html>

Please tell me this is sarcasm...

Bad enough to use inline JavaScript for a _really_ easy CSS problem,
but nesting block elements in inline elements and using
deprecated/visual HTML is just making me want to upchuck. These are
hacks we unsuccessfully applied in 1998...

This is code that just cannot be fixed quickly, safely and cheaply. If
the client thinks they know how to do it, let them do it. Prove them
with examples that it does _not_ work and then bill them for a full
cleanup.

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list