Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Always show table and cell boundaries


rocknbil - 5:03 pm on Oct 18, 2011 (gmt 0)


Yeah but dealing with borders on tables via CSS is unwieldy if you want the old school border="1" effect, more trouble than it's worth.

tables where something to do with nesting,


<faints> :-)

I used to use the add-border method but since FireBug all that's become unnecessary. Between that and the W3C validator, usually these are easy to sort out. That's really where I'd go with it.

Are the pages using JQuery? If so, add a one-liner to the included Javascript, or a three-liner in the head of the document. Note these are set with the border attribute but the scripting alters it.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled</title>
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$(function() { $('table').attr('border',1); });
</script>
</head>
<body>
<table style="width: 400px; margin:auto;" border="0">
<tr><td>blah</td><td>Blah blah</td><td> Blah de blah</td></tr>
<tr><td>blah</td><td>Blah blah</td><td> Blah de blah</td></tr>
<tr><td>blah</td><td>Blah blah</td><td> Blah de blah</td></tr>
<tr><td>blah</td><td>Blah blah</td><td> Blah de blah</td></tr>
<tr><td colspan="2">
<table border="0">
<tr><td>
I'm a nested table. Frankly, I don't know
how I got here because everyone tells me
I went extinct in 1995. But here I am,
deal with it.
</tr></td>
</table>
</td><td>&lt;-- OUCH!</td></tr>
</table>
</body>
</html>


You could also do it without jQuery but don't have time to write it up ATM . . .


Thread source:: http://www.webmasterworld.com/html/4375647.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com