我做的一个网页,用户名输入栏和密码输入栏大小不一样,怎么解决,能具体点讲解一下吗?

解决方案 »

  1.   

    有没有加<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">之类的w3c标准规范。
      

  2.   

    这个肯定的啊, 你加上css 都指定width 就可以解决了 ,
      

  3.   

    没有说怎么弄啊,具体怎么弄啊,我不会用CSS哦,这个<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">也有,但还是不一样
      

  4.   

    <%@page contentType="text/html;charset=gbk" import="java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><head><style type= "text/css ">   
    input{   
    font-family: "宋体 ";   
      }
    </style> 
    <title>用户登入界面</title>
    </head>
    <body bgcolor="#CED3FE">
    <center>
    <h1>登入范例</h1>
    <hr>
    <br>
    <%Date date = new Date(); out.println(date); %>
    <form action="login_conf.jsp" method="post">
    <table border="1" >
    <tr>
    <td bgcolor="pink"><font size="5">用户名:</font></td>
    <td> <input type="text" id="u" name="u" class="inputbox" maxlength="20" /></td>
    </tr>
    <tr>
    <td bgcolor="silver"><font size="5">密&nbsp;&nbsp;码:</font></td>
    <td><input type="password" id="p" class="inputbox" maxlength="22" /></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="checkbox" id="chkRemember" name="chkRemember" style="vertical-align:middle" class="checkbox"/>
    <label for="chkRemember" class="font_red">记住我一周</label></td>
    </tr> <tr>
    <td colspan="2">
    <input type="submit" value="登入">
    <input type="reset" value="重置">
    </td>
    </tr>

    </table>
    </form>
    </center></body>
    </html>
      

  5.   

    用CSS样式把两个输入框的宽度控制死就行了:<input type="text" style="width:100px" id="u" name="u" class="inputbox" maxlength="20" />
    <input type="password" style="width:100px" id="p" class="inputbox" maxlength="22" />你可以把style抽出来,另外用class来限定。
      

  6.   

    我在后面加hight:100px没有用,长度现在一样了,但高度还是不一样
      

  7.   

    高度也可以用CSS调:height:20px;<input type="password" style="width:100px; height:20px;" id="p" class="inputbox" maxlength="22" />甚至上下左右每一条边线的颜色、粗细,都可以用CSS调,楼主去弄个CSS的参考手册吧,保证爽死你。
      

  8.   

    <%@page contentType="text/html;charset=gbk" import="java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
    <title>用户登入界面</title>
    </head>
    <body bgcolor="#CED3FE">
    <center>
    <h1>登入范例</h1>
    <hr>
    <br>
    <%Date date = new Date(); out.println(date); %>
    <form action="login_conf.jsp" method="post">
    <table border="1" >
    <tr>
    <td bgcolor="pink"><font size="5">用户名:</font></td>
    <td> <input type="text" style="width:160px;hight:50px;" id="u" name="u" class="inputbox" /></td>
    </tr>
    <tr>
    <td bgcolor="silver"><font size="5">密&nbsp;&nbsp;码:</font></td>
    <td><input type="password" style="width:160px;hight:20px;" id="p" class="inputbox" /></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="checkbox" id="chkRemember" name="chkRemember" style="vertical-align:middle" class="checkbox"/>
    <label for="chkRemember" class="font_red">记住我一周</label></td>
    </tr> <tr>
    <td colspan="1">
    <input type="submit" class="input" value="登入">
    <input type="reset" class="input" value="重置">
    </td>
    </tr>

    </table>
    </form>
    </center></body>
    </html>------------还是不一样哦,高度没有一点变化,是不是哪里出错了,我什么都刷新,也重新加载了,还是不行。
      

  9.   

    那个hight调节大小一点都没有变化
      

  10.   

    拼写错误的话,肯定是没有任何作用的,浏览器的容错能力还没有这么强。是:  height:30px;不是:  hight