노란색박스가 가운데로 오게하려면 어떻게 하나요?
<!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년 전
감사합니다~~~~~!!
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3241 | 9년 전 | 839 | ||
| 3240 | 9년 전 | 674 | ||
| 3239 | 9년 전 | 837 | ||
| 3238 | 9년 전 | 879 | ||
| 3237 | 9년 전 | 701 | ||
| 3236 | 9년 전 | 1141 | ||
| 3235 | 9년 전 | 1124 | ||
| 3234 | 9년 전 | 684 | ||
| 3233 | 9년 전 | 654 | ||
| 3232 | 9년 전 | 675 | ||
| 3231 | 9년 전 | 569 | ||
| 3230 | 9년 전 | 873 | ||
| 3229 | 9년 전 | 863 | ||
| 3228 | 9년 전 | 874 | ||
| 3227 | 9년 전 | 1075 | ||
| 3226 |
kiplayer
|
9년 전 | 1251 | |
| 3225 | 9년 전 | 2253 | ||
| 3224 | 9년 전 | 816 | ||
| 3223 | 9년 전 | 1026 | ||
| 3222 |
커네드커네드
|
9년 전 | 776 | |
| 3221 | 9년 전 | 946 | ||
| 3220 |
|
9년 전 | 890 | |
| 3219 | 9년 전 | 857 | ||
| 3218 | 9년 전 | 861 | ||
| 3217 | 9년 전 | 2048 | ||
| 3216 |
00년생용띠
|
9년 전 | 1262 | |
| 3215 |
|
9년 전 | 1132 | |
| 3214 | 9년 전 | 927 | ||
| 3213 | 9년 전 | 1055 | ||
| 3212 |
Jangfolk
|
9년 전 | 1182 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기