我無法制作5列和流體寬度/高度的垂直條。我想要的是當頁面縮小高度增長時,每列中的文本仍在欄中。流體寬度和高度的色譜柱
這是我應該是什麼樣子和我有什麼:
現在,如果我的屏幕變小文來到酒吧外和那不是我想要的。另外我無法獲得相同的列寬。有5列應該等於100%寬度,但每個20%都不起作用。
HTML:
<div id="wizard-steps">
<div class="wizard-header float-left">Kaderings analyseaanvraag</div>
<div class="wizard-header float-left">Specificaties analyses : Type staal/stalen</div>
<div class="wizard-header float-left">Specificaties analyses : Te bepalen componenten</div>
<div class="wizard-header float-left">Specificaties analyses : Tijdschema en aantal stalen</div>
<div class="wizard-header float-left">Data-analyse</div>
</div>
CSS:
#wizard-steps {
border-radius: 3px;
border: 2px solid #a2c61c;
width: 100%;
height: 20px;
margin: 0 auto;
position: relative;
}
#wizard-steps div {
border-right: 2px solid #a2c61c;
width: 19%;
height: 20px;
text-align: center;
cursor: pointer;
float: left;
}
#wizard-steps div:last-child {
border: white;
}
.active-step {
background-color: #a2c61c;
color: white;
}
任何幫助,將不勝感激!
修訂版CSS:(THX紅光滿面&豹)
#wizard-steps {
border-radius: 3px;
border: 2px solid #a2c61c;
width: 100%;
display: table;
}
#wizard-steps div {
border-right: 2px solid #a2c61c;
width: 19%;
text-align: center;
cursor: pointer;
display: table-cell;
}
#wizard-steps div:last-child {
border: white;
}
.active-step {
background-color: #a2c61c;
color: white;
}
它得到我:
固定的任何機會當它增長時,積極的背景應該會增長嗎?由於19%,我也有一個右欄。
這樣的事情? [演示](HTTP://的jsfiddle。net/e63bhd5c /) – Ruddy 2015-01-21 08:50:58
這正是我想要的@Ruddy – 2015-01-21 08:56:37