2013-06-05 2 views
0

내 문제는 버튼/입력이 로그인 배경 상자/테이블에 머물러 있지 않다는 것입니다 ... 나는 모든 것을 시도했지만 그냥 머물러 있지 않습니다. . 그리고 이동 입력해야 login_bg 당신이 웹 브라우저 여기버튼/입력이 로그인 배경 상자/테이블에 남아 있지 않음

의 크기를 조정하는 동안 그것을 유지하기가 내 CSS입니다 :

@charset "utf-8"; 
body { 
    margin: 0 auto; 
    text-align: center; 
    background-image:url('http://img585.imageshack.us/img585/6834/backgroundyq.jpg'); 
    background-repeat:no-repeat; 
    background-attachment: fixed; 
/* cursor: url('../css/images/cursor.cur'), auto;*/ 
} 

.login_bg { 
    background-image: url('http://img838.imageshack.us/img838/6615/loginbgm.png'); 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
    background-position: center center; 
    position: relative; 
    width: 1920px; 
    height: 1080px; 
} 

.login_info { 
position: absolute; 
margin: 350px 0 0 250px; 
} 

.login_input { 
    background-color: transparent; 
    background-image: url('http://img856.imageshack.us/img856/8451/inputy.png'); 
    background-repeat: no-repeat; 
    border-top-width: 0px; 
    border-right-width: 0px; 
    border-bottom-width: 0px; 
    border-left-width: 0px; 
    border-top-style: solid; 
    border-right-style: solid; 
    border-bottom-style: solid; 
    border-left-style: solid; 
    font-family: Verdana, Arial, Helvetica, sans-serif; 
    font-size: 14px; 
    color: #666666; 
    width: 250px; 
    position: fixed; 
    top: 250px; 
    left: 130px; 
    height: 37px; 
    font-weight: bold; 
} 

그리고 여기에 HTML 코드입니다.

<div class="login_bg"> 
<table class="login_info"> 
    <tr> 
    <td height="32"><input type="text" name="account" id="account" class="login_input" tabindex="1">&nbsp;</td> 
    </tr> 
</table> 
</div> 
</body> 

여기 jsfiddle : 당신은 당신이 나를 더 이해하는 데 도움이 될 것입니다 무엇 뭔가를 알고 싶다면, 그냥 물어 있도록

http://jsfiddle.net/3TQMF/11/ 어쩌면 내가 잘 부탁 didnt한다. 감사!

+0

제목을 편집 "CSS는 아니다 협력 ". – walther

+1

입력에 '고정'위치가 있습니다. 그것은 아무데도 움직이지 않을 것입니다. 부모는 친척이어야하며, 부모는 부모와 함께 절대적으로 움직일 수 있습니다. –

+0

테이블을 사용하지 않으면 도움이됩니다. – n1xx1

답변

0

나는 당신이 찾고있는 것이 다음과 같다고 생각한다. (나는 당신의 초점이 로그인 막대를 중심으로 유지하는 것이라고 생각한다.) 나는 CSS의 일부를 찢어 테이블을 제거있어 :

<body> 
<div class="login_bg"> 
<input type="text" name="account" id="account" class="login_input" tabindex="1"/> 
</div> 
</body> 

그리고 : 같은 제목을 사용하지 마십시오, 미래 참고로 ..

@charset "utf-8"; 
body { 

    background-image:url('http://img585.imageshack.us/img585/6834/backgroundyq.jpg'); 
    background-repeat:no-repeat; 
    background-attachment: fixed; 
/* cursor: url('../css/images/cursor.cur'), auto;*/ 
} 

.login_bg { 
    background-image: url('http://img838.imageshack.us/img838/6615/loginbgm.png'); 
    position: relative; 
    width: 872px; 
    height: 545px; 
} 

.login_input { 
    background-color: transparent; 
    background-image: url('http://img856.imageshack.us/img856/8451/inputy.png'); 
    background-repeat: no-repeat; 
    border-top-width: 0px; 
    border-right-width: 0px; 
    border-bottom-width: 0px; 
    border-left-width: 0px; 
    border-top-style: solid; 
    border-right-style: solid; 
    border-bottom-style: solid; 
    border-left-style: solid; 
    font-family: Verdana, Arial, Helvetica, sans-serif; 
    font-size: 14px; 
    color: #666666; 
    width: 250px; 
    position: relative; 
    left: 45%; 
    top: 50%; 
    font-weight: bold; 
} 
+0

로그인 표시 줄에 테이블이 필요합니다 ... 양측에서 ... 왼쪽 및 오른쪽으로 ... 왼쪽으로 들어가서 로그인/암호 항목을 추가하고 오른쪽으로 패치와 같은 것을 추가하고 싶습니다. 목록 ... 그래서 이것은 해결책이 아닙니다 :/ –

+0

.login_input과 같은 다른 div를 만들고 그것을 오른쪽으로 옮깁니다. 테이블을 사용할 필요가 없습니다. –

+0

나를 위해 테이블을 사용하는 것이 더 낫습니다./ –

관련 문제