I would want it such that if there are no results for my events table, the table does not show(there is no blank space between search results where event results should be because border=0). Can you hide entire tables?

If you wanted to keep your client side HTML free of server side markup and help keep content and behavior 100% separate, you could use JQuery to hide any tables for which there are no row elements found:

thanks for the input. Will try using jQuery at a later stage
–
Kinyanjui KamauJan 17 '11 at 11:47

@Kinyanjui - This is a no-brainer. The code above will work on your HTML without needing to change anything on the server-side or the client-side other than pasting that in a <script> tag in the <head> section of your page. There are a lot of other JQuery features that you'll find handy for building your app.
–
jmort253Jan 18 '11 at 0:31

If you want to achieve this just using css and your existing code, you could create a new css class called hidden_table and set display to none:

.hidden_table {
display: none;
}

Then in your output, you can determine whether to write the css class of the table as your standard class if there are rows, or you can give the table the class "hidden_table" which will hide the entire table.