ASP.NET 两个imagebutton之间的空隙怎么去掉?在VS预览中没有 但是在浏览器中就有空隙 怎么去掉呢?

解决方案 »

  1.   

    看看你的页面源码 两个按钮中间是否有东西。
    或者用css修饰button的一个 border属性 可以设置 两个按钮之间的距离。
      

  2.   

    有时两个控件之间有空格或换行也不行的。BS VS
      

  3.   

    <asp:imagebutton..><asp:imagebutton..>挨着写
      

  4.   

    你的样式表里肯定写了text-indent属性
      

  5.   

    加一个<table cellpadding="0" cellspaceing="0">
            <tr>
                 <td>
                       <asp:button1>
                 </td>
                 <td>
                        <asp:button2>
                 </td>
            </tr>
         </table>
      

  6.   


    <table cellpadding="0" cellspaceing="0">
      <tr>
      [align=right]<td>
      <asp:button1>
      </td>[/align]  <td>
      [align=right]<asp:button2>
      </td>[/align]  </tr>
      </table>
      

  7.   

    看代码  你的两个image之间肯定有别的东西    一般是空格
      

  8.   

    img和下一个标记之间不要有空格,紧挨着