노란색박스가 가운데로 오게하려면 어떻게 하나요?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>
<style type="text/css">
body {
margin:0;
width:100%;
background-image: url();
}
.main_wrap{
width:100%;
background-color:red;
valign:top;
height:300px;
}
.main_wrap .inner{
width:50%;
float:center;
height:100px;
background-color:yellow;
valign:top;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- 메인 -->
<div class="main_wrap">
<div class="inner">
sorry.
</div>
</div>
</body>
</html>
-------------------------------------
노란색박스 float:center; 해주는데도 가운데로 안와요..
그리고
.main_wrap .inner{
는
.main_wrap {}
.inner{ }
분리해도 상관없나요? 어떤차이가 있는지요?
댓글 2개
9년 전
float:center ----> margin:0 auto; 로 한번 해보시고요
.main_wrap .inner{ 이거는 main_wrap 안에 있는 inner 만 적용 될거고요
그냥 .inner 는 inner라는 클래스에 다 적용될 거고요
맞겠죠?
.main_wrap .inner{ 이거는 main_wrap 안에 있는 inner 만 적용 될거고요
그냥 .inner 는 inner라는 클래스에 다 적용될 거고요
맞겠죠?
9년 전
감사합니다~~~~~!!
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 61 |
smilesol
|
17년 전 | 1331 | |
| 60 |
choijinhee
|
17년 전 | 1871 | |
| 59 | 17년 전 | 2091 | ||
| 58 | 17년 전 | 2304 | ||
| 57 |
지엔소프트
|
17년 전 | 1436 | |
| 56 |
보드타는찌니
|
17년 전 | 1589 | |
| 55 |
choijinhee
|
17년 전 | 1528 | |
| 54 |
끝없는도전
|
17년 전 | 1753 | |
| 53 | 17년 전 | 2345 | ||
| 52 | 17년 전 | 2206 | ||
| 51 | 17년 전 | 1865 | ||
| 50 | 17년 전 | 1467 | ||
| 49 | 17년 전 | 1726 | ||
| 48 |
stuartkim
|
17년 전 | 1529 | |
| 47 | 17년 전 | 1698 | ||
| 46 | 17년 전 | 1856 | ||
| 45 | 17년 전 | 1820 | ||
| 44 | 17년 전 | 1809 | ||
| 43 | 17년 전 | 1844 | ||
| 42 |
|
17년 전 | 1868 | |
| 41 | 17년 전 | 1821 | ||
| 40 |
보드타는찌니
|
17년 전 | 1702 | |
| 39 | 17년 전 | 2212 | ||
| 38 |
|
17년 전 | 1698 | |
| 37 | 17년 전 | 2210 | ||
| 36 |
|
17년 전 | 1601 | |
| 35 |
은사시나무
|
17년 전 | 1586 | |
| 34 | 17년 전 | 2108 | ||
| 33 | 17년 전 | 1835 | ||
| 32 | 17년 전 | 1634 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기