Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Get Rid Of Whitespace

Recommended Posts

I can't believe I can't get this one. I have a table that I am dynamically coloring using tr row id's using javascript. However in this example I have just used plain HTML. I would like the rows that are blue to stay blue and not have any white spaces in between the rows & columns. Any ideas?


Code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Alternate colored tables</title></head><body><table width="100%"  border="0" hspace="0" vspace="0">  <tr bgcolor="#0000FF" id="row1">    <th scope="col"> </th>    <th scope="col"> </th>    <th scope="col"> </th>  </tr>  <tr bgcolor="#0000FF" id="row2">    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr>  <tr>    <th scope="row" id="row3"> </th>    <td> </td>    <td> </td>  </tr>  <tr bgcolor="#0000FF" id="row4">    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr>  <tr bgcolor="#0000FF" id="row5">    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr>  <tr>    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr>  <tr bgcolor="#0000FF" id="row6">    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr>  <tr bgcolor="#0000FF" id="row7">    <th scope="row"> </th>    <td> </td>    <td> </td>  </tr></table></body></html>

Share this post


Link to post
Share on other sites

I know this is pretty obvious but hope you find it helpful, Tyssen is (always i think hehe) right... Those are attributes for the table tag, so it'll end up like this:

<table cellpadding="0" cellspacing="0">...</table>

Cheers...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.