노란색박스가 가운데로 오게하려면 어떻게 하나요?
<!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년 전
감사합니다~~~~~!!
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3001 |
|
10년 전 | 2105 | |
| 3000 |
solsu1
|
10년 전 | 1465 | |
| 2999 |
|
10년 전 | 2662 | |
| 2998 |
Qstudio
|
10년 전 | 1092 | |
| 2997 | 10년 전 | 2538 | ||
| 2996 |
|
10년 전 | 1827 | |
| 2995 | 10년 전 | 1207 | ||
| 2994 |
|
10년 전 | 1645 | |
| 2993 |
|
10년 전 | 1483 | |
| 2992 |
준짱789
|
10년 전 | 1720 | |
| 2991 | 10년 전 | 2997 | ||
| 2990 |
개발짜증나
|
10년 전 | 1150 | |
| 2989 | 10년 전 | 1404 | ||
| 2988 | 10년 전 | 3074 | ||
| 2987 |
해븐리키스
|
10년 전 | 3052 | |
| 2986 | 10년 전 | 3302 | ||
| 2985 | 10년 전 | 2963 | ||
| 2984 |
|
10년 전 | 1944 | |
| 2983 | 10년 전 | 1857 | ||
| 2982 |
프로그램은어려워
|
10년 전 | 1519 | |
| 2981 |
잘살아보자
|
10년 전 | 1116 | |
| 2980 |
잘살아보자
|
10년 전 | 1092 | |
| 2979 |
잘살아보자
|
10년 전 | 1787 | |
| 2978 | 10년 전 | 2079 | ||
| 2977 | 10년 전 | 3406 | ||
| 2976 |
|
10년 전 | 2535 | |
| 2975 |
|
10년 전 | 1650 | |
| 2974 | 10년 전 | 1602 | ||
| 2973 | 10년 전 | 1930 | ||
| 2972 |
패션리스트
|
10년 전 | 3157 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기