2013-05-13 89 views
0

我正在使用CSS和HTML ...一切看起来都很好,但当我重新调整窗口时,文本框和按钮移出位置。当窗口被调整大小时,我希望所有的东西都留在原地。帮助..我尝试使用类似于其他地方所建议的包装,但我认为即时通讯要么做错了,要么不起作用。如何在调整窗口大小时保持对象不动?

这里是网站,所以你可以得到什么IM谈论更好的抓地力... http://www.difgropliego.comze.com/diflogin.html

<html> 
<head> 
    <style> 
    #wrapper { 
     width: 800px; 
     margin:0 auto; 
    } 

    body { 
     background-color:black; 
     background-image:url(diflogin.png); 
     background-repeat:no-repeat; 
     background-position:center top; 
     margin:0 10% 0 10%; 
     padding:0 0 0 0; 
     border:0 0 0 0; 
    } 

    #user { 
     position:absolute; 
     left: 306px; 
     top: 455px; 
    } 

    #contra { 
     position: absolute; 
     left: 904px; 
     top: 455px; 
    } 

    #web-buttons-idgi5a2 { 
     position: absolute; 
     left: 1023px; 
     top: 601px; 
    } 

    #web-buttons-idgi5a2 a { 
     display:block; 
    } 

    #web-buttons-idgi5a2 a:hover { 
     background-position:left bottom; 
    } 

    a #web-buttons-idgi5a2a { 
     display:none 
    } 
    </style> 
</head> 
<body> 
    <div id="wrapper"> 
     <label for="user"></label> 
     <input type="text" name="user" id="user" /> 
     <label for="contra"></label> 
     <input type="text" name="contra" id="contra" /> 

     <table id="web-buttons-idgi5a2" width=0 cellpadding=0 cellspacing=0 border=0> 
      <tr> 
       <td style="padding-right:0px" title ="INGRESAR"> 
        <a href="#" title="INGRESAR" style="background-image:url(buttoning.png);width:160px;height:61px;display:block;"><br/></a> 
       </td> 
      </tr> 
     </table> 
    </div> 
</body> 
</html> 

回答

0

您输入,如果你希望他们留在屏幕上显示尝试使用比例如下图所示:

#user{ 
    position:absolute; 
    left: 10%; 
    top: 20%; 
} 
相关问题