|
Post by Schubaltz on Apr 18, 2007 18:49:49 GMT -5
Description: Splits the main-page categories into tables separated by set margins.
Source: Open
Cross-browser: Yes
Editing: red - margin
Main Footer
<style type="text/css"> <!-- .split { width: 100%; margin-bottom: 24px } .split td { padding: 4px } --> </style> <script type="text/javascript"> <!-- // Split Categories
var split = [ ]; if(/com\/(\w+\.cgi)?\??(#.+|\w+=home)?$/i.test(location.href)) for(var l = document.links, k = 4; k < l.length; k ++) if(l[k].className == "nav") { var t = l[k].parentNode.getElementsByTagName("table"); for(var i = t[1].rows, x = 1; x < i.length; x ++) if(i[x].cells.length > 1 || i[x].cells[0].align == "right") split[split.length - 1] += "<tr>" + i[x].innerHTML + "</tr>"; else split.push(["<table cellspacing='1' class='split bordercolor'><tr>" + i[0].innerHTML + "</tr><tr>" + i[x].innerHTML + "</tr>"]); var con = document.createElement("div"); con.innerHTML = split.join("</table>") + "</table>"; t[0].style.backgroundColor = "transparent"; t[1].parentNode.replaceChild(con, t[1]); break; } //--> </script>
|
|