By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,276 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,276 IT Pros & Developers. It's quick & easy.

Eliminate gaps between table cells...

P: n/a
I have a table contains 4 cells (2 x 2) like this

http://www.coolshare.com/planttrade/temp/gap.jpg

each cell contains a div and the div contains a table.

As you can see from the image above, there are gap between
these 4 cells of the top level table. I tried to use "cellspacing=0
cellpadding=0" on the top level table and
"align valign" on each td and tr but still couldn't remove
the gaps...

Any suggestion will be really appreciated

thanks

the html code:

<table cellspacing=0 cellpadding=0 >
<tr valign="bottom">

<!-- cell 1 -->
<td align="right" valign="bottom">
<div id="headerLeftDiv" align="right" style="overflow:hidden;">
<table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

<!-- cell 2 -->
<td align="left" valign="bottom">
<div id="headerLeftDiv" align="right" style="overflow:hidden;">
<table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>
</tr>

<tr valign="top">

<!-- cell 3 -->
<td align="right" valign="top">
<div id="headerLeftDiv" align="right" style="overflow:hidden;">
<table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

<!-- cell 4 -->
<td align="left" valign="top">
<div id="headerLeftDiv" align="right" style="overflow:hidden;">
<table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

</tr>
</table>

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
cool2005 wrote:
I have a table contains 4 cells (2 x 2) like this

http://www.coolshare.com/planttrade/temp/gap.jpg

each cell contains a div and the div contains a table.

As you can see from the image above, there are gap between
these 4 cells of the top level table. I tried to use "cellspacing=0
cellpadding=0" on the top level table and
"align valign" on each td and tr but still couldn't remove
the gaps...

Any suggestion will be really appreciated

thanks

the html code:

<table cellspacing=0 cellpadding=0 >
<tr valign="bottom">

<!-- cell 1 -->
<td align="right" valign="bottom">
<div id="headerLeftDiv" align="right" style="overflow:hidden;"> <table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

<!-- cell 2 -->
<td align="left" valign="bottom">
<div id="headerLeftDiv" align="right" style="overflow:hidden;"> <table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>
</tr>

<tr valign="top">

<!-- cell 3 -->
<td align="right" valign="top">
<div id="headerLeftDiv" align="right" style="overflow:hidden;"> <table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

<!-- cell 4 -->
<td align="left" valign="top">
<div id="headerLeftDiv" align="right" style="overflow:hidden;"> <table border=1 cellspacing=0 cellpadding=0>
</table>
</div>
</td>

</tr>
</table>


Not exactly JavaScript....

A jpg & some 'simulated' HTML isn't much to go on. What were we suposed
to look at?

Unlikely you really need a table inside a div inside a table cell. And
the whitespace from all that fancy formatting is suspect. Try removing
it tab-by-tab to see what happens. Might want to try another ng (with
real code).

Jul 23 '05 #2

P: n/a
The blue area in the jps is the gaps.
Yes, I do need "a table inside a div inside a table cell" because I
need to div to scroll the
table.

Maybe I should redescribe my question:

how can I remove the gaps between cells of a table if cells contain
divs?

thanks

Jul 23 '05 #3

P: n/a
"cool2005" <co*******@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
The blue area in the jps is the gaps.
Yes, I do need "a table inside a div inside a table cell" because I
need to div to scroll the
table.

Maybe I should redescribe my question:

how can I remove the gaps between cells of a table if cells contain
divs?

thanks


Your image gives "The page cannot be displayed".

Why use <div>? Can you substitute <span>?

Or assign the id, class, style (whatever) to the <td> tag.

Note that, AFAIK, valign= applies to <tr> not <td> tags.
Jul 23 '05 #4

P: n/a
Learn CSS.

Jul 23 '05 #5

P: n/a
Learn CSS. comp.infosystems.www.authoring.stylesheets

epp

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.