Click here to Skip to main content
Sign Up to vote bad
good
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 7 Nov '12 - 2:07

Comments
Tadit Dash - 7 Nov '12 - 8:21
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:54
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
Tadit Dash - 7 Nov '12 - 13:10
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:54
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:26
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. Smile | :)
 
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
  Permalink  
Comments
pranathis012 - 7 Nov '12 - 23:07
sry what i want is to remove the space between two rows
Sergey Alexandrovich Kryukov - 7 Nov '12 - 23:55
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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Mohammed Hameed 268
1 OriginalGriff 236
2 Sergey Alexandrovich Kryukov 153
3 Mayur_Panchal 153
4 CPallini 100
0 Sergey Alexandrovich Kryukov 8,171
1 OriginalGriff 6,246
2 CPallini 3,532
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 7 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid