div 해상도 관계없이 중간정렬 하고 싶어요 ㅠㅠ

· 15년 전 · 1679 · 8

아래 소스는 이렇습니다!
현재는 left:0 으로 해서 무조건 인터넷창 제일 왼쪽으로 정렬이 되는데요.
해상도 상관없이 중간정렬을 하고 싶은데 어떻게 해야될까요.
아무리 해도 안되요 ㅠㅠ

<div id="allmn">
<div id="ain">
     <div class="cbtn">
     <a href="#;" onClick="document.getElementById('allmn').style.display='none';return false;"</a>
     </div>

 <table cellspacing="0" class="alltb" align="center">
 <colgroup><col width="130px"></colgroup>
 <tbody align="center">
 <tr>
 <td>
  <div class="t1"><img src="../title_1.gif"></div>
  <ul class="su">
  <li><img src="../images/main/sitemap/title_1_1.gif"></li> 
  </div>
 </td>
 </tr>
 </tbody>
 </table>

</div>
</div>


===========================================
<css>

#allmn {display:none;position:absolute;left:0;top:10;width:100%;height:450px;padding-top:30px;margin-top:58px;background:#ffffff url('../images/main/sitemap/allmbg.jpg') no-repeat left top;z-index:1000000; }/
#allmn .alltb {height:100%;margin:0px auto;text-align:center;overflow:hidden;}
#allmn .alltb td {vertical-align:top;}
#allmn .alltb .t1 {height:30px;text-align:left;}
#allmn .alltb .t1 img {margin-left:16px;}
#allmn .alltb .su {clear:both;display:block;width:125px;margin:0px auto;padding-bottom:3px;text-align:left;}
#allmn .alltb .su li {padding-bottom:5px;}
#allmn .alltb .sin {padding-left:5px;}
#allmn .alltb .sin td {height:15px;}

#allmn .alltb .su2 {clear:both;padding-top:50px;}
#allmn .alltb .su2 li img {#margin-bottom:-1px;}
#allmn .alltb .t2 {height:15px;padding-top:25px;text-align:left;}
#allmn .alltb .t2 img {margin-left:12px;}
#allmn #ain {position:relative;width:100%;}
#allmn .cbtn {position:absolute;right:0;top:0;margin-right:20px;margin-top:-10px;}

|

댓글 8개

#wrap {position:relative;width:980px;margin:0 auto;}
적용하실 div속성을 요렇게요.
주시면 됩니다.
저 그리고 포인트 1만점만 주시면 안되나요 ㅠㅠ
포인트가 없어서 글이 안써짐요 젭알~~~
이걸 어디에 넣으라는 말씀이신가요? ㅠㅠ div가 많아서 어딜 넣어야되는건지...ㅠㅠ 그리고 relative 하면 div가 테이블위로 뜨는게 아니라 테이블을 밀어내고 자리를 차지해버려요 ~
레이어 팝업이라서 absolute 사용 한 것 같은데요 자스를 이용해야 합니다..
www.sjsjin.com 소스보기해서 자바스크립트 복사해서 사용하십시오.
http://www.itoa.co.kr/bbs/board.php?bo_table=javascript&wr_id=15

이글 참고해보세요.
$(document).ready(function(){

$(window).resize(function(){

$('#allmn').css({
position:'absolute',
left: ($(window).width()
- $('#allmn').outerWidth())/2,
top: ($(window).height()
- $('#allmn').outerHeight())/2
});

});

$(window).resize();

});

jquery로 간단히
당연히 맨처음 div죠 ㅠㅠ
의견 감사합니다~ 다른 방법으로 해결했어요 ~~ ㅎㅎ
댓글을 작성하시려면 로그인이 필요합니다. 로그인

디자인

+
제목 글쓴이 날짜 조회
15년 전 조회 598
15년 전 조회 1,508
15년 전 조회 1,172
15년 전 조회 594
15년 전 조회 1,404
15년 전 조회 1,604
15년 전 조회 4,281
15년 전 조회 746
15년 전 조회 850
15년 전 조회 734
15년 전 조회 971
15년 전 조회 939
15년 전 조회 1,333
15년 전 조회 916
15년 전 조회 985
15년 전 조회 814
15년 전 조회 932
15년 전 조회 1,235
15년 전 조회 844
15년 전 조회 960
15년 전 조회 708
15년 전 조회 3,995
15년 전 조회 734
15년 전 조회 830
15년 전 조회 821
15년 전 조회 853
15년 전 조회 1,284
15년 전 조회 675
15년 전 조회 773
15년 전 조회 624
15년 전 조회 1,260
15년 전 조회 836
15년 전 조회 1,009
15년 전 조회 937
15년 전 조회 847
15년 전 조회 1,137
15년 전 조회 2,457
15년 전 조회 825
15년 전 조회 740
15년 전 조회 823
15년 전 조회 733
15년 전 조회 908
15년 전 조회 1,036
15년 전 조회 4,002
15년 전 조회 851
15년 전 조회 993
15년 전 조회 1,428
15년 전 조회 603
15년 전 조회 1,307
15년 전 조회 1,680
15년 전 조회 796
15년 전 조회 1,726
15년 전 조회 1,151
15년 전 조회 851
15년 전 조회 4,152
15년 전 조회 2,819
15년 전 조회 1,437
15년 전 조회 1,283
15년 전 조회 7,776
15년 전 조회 797
15년 전 조회 4,791
15년 전 조회 1,786
15년 전 조회 1,090
15년 전 조회 675
15년 전 조회 1,043
15년 전 조회 772
15년 전 조회 722
15년 전 조회 753
15년 전 조회 728
15년 전 조회 789
15년 전 조회 695
15년 전 조회 939
15년 전 조회 705
15년 전 조회 897
15년 전 조회 1,026
15년 전 조회 790
15년 전 조회 797
15년 전 조회 707
15년 전 조회 909
15년 전 조회 1,558
15년 전 조회 1,579
15년 전 조회 801
15년 전 조회 1,070
15년 전 조회 813
15년 전 조회 1,247
15년 전 조회 4,455
15년 전 조회 1,056
15년 전 조회 977
15년 전 조회 1,350
15년 전 조회 894
15년 전 조회 852
15년 전 조회 3,113
15년 전 조회 944
15년 전 조회 908
15년 전 조회 899
15년 전 조회 951
15년 전 조회 1,298
15년 전 조회 854
15년 전 조회 635
15년 전 조회 1,194
🐛 버그신고