Jul 20, 2008

Get Rid Of Whitespace

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Get Rid Of Whitespace

kvarnerexpress
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:


CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta 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">&nbsp;</th>
   <th scope="col">&nbsp;</th>
   <th scope="col">&nbsp;</th>
 </tr>
 <tr bgcolor="#0000FF" id="row2">
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr>
   <th scope="row" id="row3">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr bgcolor="#0000FF" id="row4">
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr bgcolor="#0000FF" id="row5">
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr>
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr bgcolor="#0000FF" id="row6">
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr bgcolor="#0000FF" id="row7">
   <th scope="row">&nbsp;</th>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
</table>
</body>
</html>

 

 

 


Reply

Tyssen
You'll need to set cellpadding and cellspacing to 0.

Reply

Lozbo
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:

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


Cheers...

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : rid whitespace


    Looking for rid, whitespace

Searching Video's for rid, whitespace
advertisement



Get Rid Of Whitespace



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE