开发者

How to get two TD cells side by side WITHOUT using css

in the following HTML snippet, I would like the two cells be placed side by side with开发者_开发技巧 NO spaces between them; without using css if possible. If the leftmost position of the 2nd one is the rightmost position of the 1st, why WOULD they have any space between? thx.

  <TR>

  <TD style="position:absolute; top:98px; left:0px; right:56px; bottom:126px; font-size: 7pt; background-color:Lime; text-align: center; font-family: Arial;" cellpadding="0" cellspacing="0">ABC</TD>



     <TD style="position:absolute; top:98px; left:56px; right:112px; bottom:126px; font-size: 7pt; background-color:Lime; text-align: center; font-family: Arial;" cellpadding="0" cellspacing="0">123</TD>


Why absolutely position your table cells? They automatically render next to each other. All you need to do is border-spacing="0" if I remember correctly. It'd be much easier with css though =)


I'm not entirely sure I understand the question... The space in between them in the source will be ignored by the browser, and should put them next to each other.

Do you want to remove the padding between the cells? Try adding style="border-collapse: collapse" to the <table> element. But even better would be to move your styling over to a css file, since you've got so much going on there.

edit: Ah, now I notice the position: absolute in there. Get rid of that (and the top, right, bottom, and left that go with it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜