B

저 정신이없는건가요? 틀린건가요?

맨날가지고 노는걸 요즘잠을 재대로 못봐서
짧은거 하나.... 이거 맞는데 왜안되지 그러고 앉아있어요;;

정신이 없는건가요? 틀린건가요?

<html>
<head>
<title>제작중</title>

<style>
#wrapper {width: 952px; margin: auto;}
#top{width:952px; height:40px; background:url(Mu.png);}
#sub{width:952px; height:30px; background:url(sub.png);}
</style>

</head>
<body>

<div id="wrapper">
<div id="top">d</div>
<div id="sub">d</div>
</div>

</body>
</html>
|

댓글 13개

body{_text-align:center}
추가
ㅠㅠ 이렇게하면 글자까지 중앙정렬 되서 ㅠㅠ 흐엉 ㅠㅠ
margin:auto; 이러면 지금까지 잘됬는데 ㅠㅠ 왜지금은 안되는걸까용 ㅠㅠ
저상태로 가능하긴 한가요? 아무리봐도 그리될 내용은 아닌듯 한데요.
저도 웹표준관련 책을 최근봐서 - -
그 웹표준책에서도 지금까지도 ㅠㅠ
margin:auto; 이렇게 중앙정렬했는데 갑자기 안되네용 ㅠㅠ
역시 네이버에서도 저렇게 나오는데 ㅠㅠ
카피해서보면 잘되는데 제가 짜면 안되네용 ㅠㅠ
아마 심하게 피곤하신듯....

아까 저도 막 급하게 코딩하다가

hegit 이렇게 타이핑 한걸 한참 못 찾았음... ㅋㅋㅋ
헐 ㅋㅋ hegit ㅋ키키키키키 ㅋ
wrapper 를 가운데 정렬하려는데 안된다는 거에요?

#wrapper {width: 952px; margin: 0 auto;}

아님 <div id="top"> 예를 가운데 정렬을 하되 text-align 은 left 로 한다는거에요?

그럼 # top 도 margin 0 auto 하믄 되요.

안될리가 없잖아요.. -..-;;
ㅠ ㅠ 진짜안되용 ㅠㅠ margin:0 auto 해두안되용 ㅠㅠ
왜그러죵 제컴이 후진건가용? ㅠㅠ 제머리상태가 후달달한건가용 ㅠㅠ흐엉
아... IE 에서 안된다구요?

당근 안되죠... 그누보드 4는 quirks mode 니까

DTD 선언을 하세요.. 그럼 돼요....


DTD 선언하기 싫으면 width 를 반으로 나눠서 하는 방법이 있긴한데...

코딩이 걸레가 되서 보기도 않좋고... 나중에 여러가지로 귀찮아요....

그냥 DTD 선언하세요.
음 그런거였어요?
아... dtd선언 때문인건가봐여ㅋㅋ
<style type="text/css">
#wrapper {width:100%; margin:0 auto;border:1px solid #000;text-align:center;}
#top{width:952px; height:40px; background:url(Mu.png);border:1px solid #000;}
#sub{width:952px; height:30px; background:url(sub.png);border:1px solid #000;}
</style>

이렇게 하시면 됩니다.
이렇게 하믄 text 가 가운데 정렬이 됨니다... -..-;;

text-align 은 text 를 정렬하라고 있는겁니다.
윗분말씀데로 닥타입이 문제지요.
스타일시트는 저거에 제일 민감하니까요.
로컬에서는 먹는데 서버에서는 안먹으면 서버 마임설정이 문제더라고요..


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>Untitled Document</title>
<style type="text/css">
* {padding:0; margin:0}
#wrapper {margin: 0 auto; width:952px}
#top{width:952px; height:40px; background:url(Mu.png);}
#sub{width:952px; height:30px; background:url(sub.png);}
</style>
</head>

<body>
<div id="wrapper">
<div id="top">d</div>
<div id="sub">d</div>
</div>
</body>
</html>
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 1,077
13년 전 조회 1,049
13년 전 조회 1,623
13년 전 조회 1,065
13년 전 조회 1,175
13년 전 조회 1,667
13년 전 조회 866
13년 전 조회 2,664
13년 전 조회 1,077
13년 전 조회 1,612
13년 전 조회 1,005
13년 전 조회 1,568
13년 전 조회 970
13년 전 조회 1,262
13년 전 조회 1,857
13년 전 조회 2,536
13년 전 조회 1,004
13년 전 조회 1,575
13년 전 조회 1,616
13년 전 조회 1,746