我目前正在爲一個新的Web應用程序工作skeleton layout,但在CSS佈局和DIV中遇到了一些最明顯的問題。將div元素縮放到窗口大小
1)方框1和2(第1列)與3(第2列)和4(第3列)不對齊。我怎樣才能理清這一點?
2)我真的很喜歡界面here,當最小化到一定大小時會自動調整大小,並在窗口最大化時自動調整大小。我一直試圖將這個實現到我的佈局,但不能。不幸的是,頁腳如何「突出」。我希望一切都適合一個頁面。如何在上述網站上實現此目標?
非常感謝提前。
HTML:
<!--
============================================
LOGO
============================================
-->
<div id="wrapper">
<div class="logo">logo</div>
<!--
============================================
NAVBAR
============================================
-->
<div id="header">
<a href="#">link 1</a>
|
<a href="#">link 2</a>
|
<a href="#">link 3</a>
|
<a href="#">link 4</a>
</div>
<div style="clear: both;"></div>
<!--
============================================
NAVIGATION & CONTACTS
============================================
-->
<div class="column" id="first-column">
<div class="window" id="window-1">1</div>
<div class="window" id="window-2">2</div>
</div>
<!--
============================================
MAIN CONTENT
============================================
-->
<div class="column" id="second-column">
<div class="window" id="window-3">3</div>
</div>
<!--
============================================
CHAT
============================================
-->
<div class="column" id="third-column">
<div class="window" id="window-4">4</div>
</div>
<!--
============================================
FOOTER
============================================
-->
<div style="clear: both;"></div>
<div class="footer">footer</div>
</div>
CSS:
/*
============================================
GENERAL
============================================
*/
body, html{
font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
height: 100%;
}
/*
============================================
LAYOUT SKELETON
============================================
*/
#wrapper {
margin: 0 auto;
max-width: 1212px;
min-height: 540px;
min-width: 784px;
position: relative;
height: 100%;
}
#header{
text-align:right;
padding:5px;
font-size:10px;
padding-right: 30px;
}
#first-column{
width: 20%;
padding-left: 5px;
height: 100%;
}
#second-column{
width: 50%;
height: 100%;
}
#third-column{
width: 25%;
}
.window{
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border:1px solid #CECECE;
width:100%;
}
#window-1{
height:50%;
}
#window-2{
margin-top:10px;
height:50%;
}
#window-3{
height: 100%;
}
#window-4{
height:100%;
}
.column{
float:left;
margin: 5px;
height: 100%;
}
.logo {
font-family: arial;
font-size: 12px;
float: left;
padding-left: 10px;
}
.footer {
margin-top: 10px;
padding-left: 10px;
}
鏈接可能會變陳舊,請包括問題中的代碼。 – Sphvn 2012-07-25 13:29:52
我已經包含代碼了! – methuselah 2012-07-25 13:33:35