시도했지만 Google지도 레이아웃을 초과하는 인터페이스를 배치하지 못했습니다. 내가 뭘하려고하는 것은 이것이다 :올바른 CSS div 위치 지정?
내가 가진 형식은 다음과 같이이다 : 나는 수평을 중심으로 상단 메뉴를 만드는 데 성공
<div id="GoogleMap"> // the containing google maps layer
<!-- map will go here <div id="GoogleMapCanvas"></div> --> //eventual map
<div class="map-topmenu"></div> //my interface
<div class="map-leftmenu"></div> //my interface
<div class="map-rightmenu"></div> //my interface
<div class="map-bottommenu"></div>//my interface
</div>
및 10px에서 화면의 상단.
저는 왼쪽 및 오른쪽 메뉴를 세로로 가운데에 맞출 수 없었습니다. 왼쪽 메뉴를 가운데 맞추기 위해 필요한 코드가 이상하게 보였습니다. 그리고 맨 아래 메뉴에 관해서는, 나는 완전히 실패했습니다.
누구든지 내 코드를보고 내가 엉망인 곳을 알려주시겠습니까? 정말 고마워! 음의 여백
body {
border: 0 none;
margin: 0;
padding: 0;
height:100%;
}
#GoogleMap {
position:absolute;
background-color: grey;
background-position: 50% 50%;
background-repeat: repeat;
height: 100%;
overflow: hidden;
width: 100%;
}
.map-topmenu {
height: 52px;
width: 353px;
background-image: url(http://i.imgur.com/KlyKR.png);
margin-top: 10px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
.map-leftmenu {
height: 263px;
width: 77px;
margin-left: 10px;
top:50%;
position: absolute;
margin-top: -150px;
background-image: url(http://i.imgur.com/Q3d1r.png);
}
.map-rightmenu {
background-image: url(http://i.imgur.com/si6dl.png);
height: 147px;
width: 280px;
margin-right: 10px;
float: right;
top:50%;
}
.map-bottommenu {
background-image: url(http://i.imgur.com/iDmuP.png);
height: 52px;
width: 312px;
margin-right: auto;
margin-bottom: 10px;
bottom: 0;
margin-left: auto;
}
와우, 감사합니다 Xander! – pufAmuf