How to make rounded tables

Submitted by CyberAlien, Feb 2007.
Page: 4
Pages: [1] [2] [3] [4] [5]
Now we have header images and code, so we can add it to template code. How to do it varies for different forums.

In this tutorial I will show how to do it only for simple tables. For more complex tables I'll create another tutorial.

On this page I'll show how to do it with phpBB 2.0, see next pages for other forum systems.

phpBB

Find code for a table that you want to modify. In this example I'll show how to modify "who's online" section of forum index. This is original code for it:
Code:
  1. <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">  
  2.  <tr>  
  3.    <td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>  
  4.  </tr>  
  5.  <tr>  
  6.    <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>  
  7.    <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>  
  8.    </td>  
  9.  </tr>  
  10.  <tr>  
  11.    <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>  
  12.  </tr>  
  13. </table>  
Text that will work well for header is in first row of that table, so move that code above header and remove everything other than title. Also class="cattitle" should be removed from it because we have different font for header:
Code:
  1. <a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a>  
  2. <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">  
  3.  <tr>  
  4.    <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>  
  5.    <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>  
  6.    </td>  
  7.  </tr>  
  8.  <tr>  
  9.    <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>  
  10.  </tr>  
  11. </table>  
Now add first and second part of html code for header before and after table text:
Code:
  1. <table border="0" cellspacing="0" cellpadding="0" border="0" width="100%">  
  2. <tr>  
  3.  <td width="26" align="left"><img src="images/corner_left.gif" width="26" height="28" border="0" alt="" /></td>  
  4.  <td width="100%" align="left"><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></td>  
  5.  <td width="6" align="right"><img src="images/corner_right.gif" width="6" height="28" border="0" alt="" /></td>  
  6. </tr>  
  7. </table>  
  8. <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">  
  9.  <tr>  
  10.    <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>  
  11.    <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>  
  12.    </td>  
  13.  </tr>  
  14.  <tr>  
  15.    <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>  
  16.  </tr>  
  17. </table>  
That's all. You've changed header of that table to rounded header, and you should do the same to other tables. If table doesn't have any header use &nbsp; for title to make empty title.
Page: 4
Pages: [1] [2] [3] [4] [5]

Share this tutorial

If you want to show this tutorial to someone else please use following code to link to this tutorial:
HTML Link:
Forum BBCode:
Content of this tutorial may not be published anywhere else without author's permission. Please link to this page instead.