我在一个自定义控件里用呢form,然后在主页面调用自定义控件后,页面就变形呢。  
  <form style="display:inline;margin:0;padding:0">加了这些还是没效果  晕死个中国人

解决方案 »

  1.   

    form不能设置css样式的<form>
    <div style="display:inline;margin:0;padding:0"
    </div>
    </form>
      

  2.   

     <form style="border:0;margin:0;padding:0">
    这样就可以了,如果没起作用,那么就不是form导致的
      

  3.   

    我在一个自定义控件里用呢form,然后在主页面调用自定义控件后,页面就变形呢。   
      <form style="display:inline;margin:0;padding:0">加了这些还是没效果当我把<form>去掉就没事呢,不过在火狐浏览器里,不会出现这种错误。界面错误是这样的:当我在自定义控件里用呢<form>,然后主界面引用<%@ Register TagName="soso2009" TagPrefix="uc1" Src="ascx/soso2009_2.ascx" %>            <div style="margin: auto; width: 950px;">
                    <uc1:top_login ID="top_login" runat="server" />
                </div>
                <table id="t1" width="950" align="center" cellpadding="0"              cellspacing="0" >
                 <tr>
                   <td>nihao<td>
                 </tr>
               </table>这时就出粗呢,下面<table id="t1">里的东西就会直接覆盖在自定义控件上面(比如自定义控件里有个表,<table id="t1"里面那个"nihao" 就会出现在自定义控件那个表的内容上)
      

  4.   

    table外层也加个div试试,并设置div的边框和高度,看看到底是哪里出了问题
      

  5.   

    我常用的方法,给层加上border就可以看到它的大小了<div style="margin: auto; width: 950px; border:1px solid #ff0000;">
      <uc1:top_login ID="top_login" runat="server" />
      </div>
    <div style="border:1px solid #ff0000;">
      <table id="t1" width="950" align="center" cellpadding="0" cellspacing="0" >
      <tr>
      <td>nihao<td>
      </tr>
      </table>
    </div>
      

  6.   

    本来就是div,table 也用过,form的位置也换过好几个地方,效果不佳呀
      

  7.   

    我也加呢border=3看呢效果,《form》把div撑高呢,用table也一样。
      

  8.   

    看不到图的,
    把form前后的空格删除试试