고정 된 측면 탐색 모음이 있습니다. 헤더와 본문 내용이 있는데, 헤더와 관련하여 양식이 중앙에 있기를 원합니다.
HTML
<body>
<div id="sideNav">
SideNav
</div>
<div id="mainContent">
<div id="header">
<div>
<h3>
Header
</h3></div>
</div>
<div class="body-content">
<form id="form1">
<h3>
Form
</h3>
<div id="formset">
<table>
<tr>
<td>
<label>Login</label>
</td>
<td>
<input type="text" />
</td>
</tr>
</table>
</div>
</form>
</div>
</div>
</body>
CSS
* {
margin: 0;
padding: 0;
}
body {
position: relative;
}
#sideNav {
width: 150px;
height: 100%;
background-color: #6bc7cc;
position: fixed;
width: 15%;
}
#mainContent {
background-color: Aqua;
height: 100%;
position: absolute;
left: 15%;
right: 0;
}
#header {
width: 100%;
height: 50px;
background-color: #fcb;
}
.body-content {
margin: 45px;
}
#formset {
width: 500px;
margin: 0 auto;
}
이것을 사용하면 #formset의 스타일이 아니라 도움이 될 수 있습니다.
#form1{
display: table;
margin: 0 auto;
}
#formset{
width:none;
margin: 0 auto;
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다