Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<table id="tab" width="100%" style="border-right-style: solid; border-right-width: thin" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td   align="left" width="60%" style="border-right-style: solid ; border-right-width: thin" height="100%" colspan="0" rowspan="0" valign="middle">
 </td>
 <td  align="right" width="40%" height="100%" colspan="0" rowspan="0" valign="middle">
  </td>
Posted
Comments
With this code, I cannot find any cell space.
There is no space. They are next to each other.
Sergey Alexandrovich Kryukov 7-Nov-12 12:54pm    
If you load this HTML in the browser, you will see that td are stretched to sided of the window...
Besides, with formally 0 padding + 0 margin still there is a tiny gap, depending on layout engine; I doubt it can be reduced.
--SA
I am unable to find that gap.
Can you please show me that gap in an image ?
Thanks...
Sergey Alexandrovich Kryukov 7-Nov-12 16:54pm    
How can I show it?
load this to a Browser:

<table>
<tr>
<td>MMM</td><td>HHH</td>
</tr>
</table>

I've chosen MMM and HHH on purpose, to see the gap between M and H. I depends on the layout engine.
--SA
Bala Selvanayagam 7-Nov-12 8:26am    
Are you using style sheet ?

if so, please post the releveant section.

1 solution

Remove all style, width and cellspacing attributes from this HTML, and you will see that the gap is greatly reduced. :-)

Please see my comment to the question.

Next time, never ever do such things. Use CSS and only CSS, and always in separate link or style elements under the head element. How? Well, you did not tell us what rendering you want to achieve. Do it the right way first, and then, if you fail, ask another question, but then describe your goal in detail.

On proper referencing of CSS in HTML documents or embedding them, please see:
http://www.w3.org/TR/html4/present/styles.html[^].

To learn styles, start here:
http://en.wikipedia.org/wiki/CSS[^],
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28CSS%29[^],
http://www.w3.org/Style/CSS/[^].

This can be a useful tool for you: http://www.webtutorialplus.com/css3-generator.aspx[^].

—SA
 
Share this answer
 
Comments
[no name] 7-Nov-12 23:07pm    
sry what i want is to remove the space between two rows
Sergey Alexandrovich Kryukov 7-Nov-12 23:55pm    
I told you how to do it. Did you get it?
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900