0
我有問題固定div顯示內的元素的寬度作爲表,我意識到引起這個問題的標題,我試圖解決它沒有成功,在這裏是例如:固定在div顯示內的元素的寬度如表
這裏是代碼:
.row {
display:table;
border-spacing:10px;
width: 100%;
height: 100%;
}
.row-element {
display: table-cell;
}
.row-element input{
width:100%;
line-height:20px;
}
.row-element label{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #2E2F3F;
display: table-caption;
white-space: nowrap;
width:100%;
box-sizing:border-box;
}
<div class="row">
<div class="row-element">
<label>Name#<span class="mandatory"> *</span></label>
\t <input data="true" type="text" class="textfield error" title="Name" minlength="5" maxlength="15" message="Insert Your Name !" name="NAME_FIELD" mandatory="">
\t \t \t \t \t </div>
\t \t \t \t \t <div class="row-element"><label>Outside Label > <span class="mandatory"> *</span></label>
\t \t \t \t \t
\t \t \t \t \t <input data="true" type="text" class="textfield error" minlength="5" maxlength="15" message="Insert Your Name !" name="NAME_FIELD" mandatory="">
\t \t \t \t \t </div>
<div class="row-element">
<label>custom_mandatory text#<span class="mandatory"> (Please Specify)</span></label>
<input data="true" type="text" class="textfield error" mandatory-text="(Please Specify)" title="custom mandatory text" message="Insert Your Name !" name="NAME_FIELD" mandatory="">
\t </div> \t \t \t \t \t
</div>
這裏是我的例子:http://codepen.io/pen/vGeBKN – arefedrees
目前還不清楚什麼是理想的結果 – bumpy
如果你打開我的第一條評論中提及的鏈接,你會看到輸入不一樣,每個元素都有相同的寬度,這是問題顛簸 – arefedrees