Saturday, April 28, 2007

Sexy Web-Design Trick

Here is something I shared with my colleagues previously in company's internal blog. Something quite useful to a web- designer or developer.


var tables = document.getElementsByTagName("table");

for(var i = 0; i < tables.length; i++){ tables[i].style.border = "2px dotted #000000"; tables[i].style.padding = "4px"; };

var divs = document.getElementsByTagName("div");

for(var i = 0; i < divs.length; i++){ divs[i].style.border = "1px dashed #dddddd"; divs[i].style.padding = "4px"; };


I'm using this as a Firefox bookmark, here's an example:



- yc, stoning

No comments: