[TIP] Leave Comments
by
15 Oct 2002
This isnt a very in depth thing but some people never seem to think about thr wonderul <!-- --> tag. You should always leave comments in your code when creating complex tables and templets. lets take the welcome pannel for instance. This mod has one big table then one row, then a 3 cells with tables rows and cells inside them and some with tables rows and cells inside the tables inside the cell with tables rows and cells. confusing eh? well if you leave comments you can look for them and instantly know exactly where you are. so we can turn something like this: Code:
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#000000"> <tr bgcolor="#0055CC"> <td colspan="3"> <normalfont>Welcome to {boardtitle}! </td> </tr> <tr> <td bgcolor="#DDDDDD"> <smallfont>Avater: <table> <tr> <td> <br><img src="avater.gif"> </td> </tr> </table> </td> </tr> </table> into this: Code:
<!-- Start main table --> <table border="0" cellpadding="2" cellspacing="1" bgcolor="#000000"> <!-- catagory like row/cell --> <tr bgcolor="#0055CC"> <td colspan="3"> <normalfont>Welcome to {boardtitle}! </td> </tr> <!-- main row with the three main cells --> <tr> <!-- avater cell --> <td bgcolor="#DDDDDD"> <smallfont>Avater: <!-- avater table --> <table> <tr> <td> <br><img src="avater.gif"> </td> </tr> </table> <!-- end avatar cell --> </td> <!-- end main row --> </tr> <!-- end main table --> </table> anyway thats my tip. enjoy |