我有查看與跨度的一些輸入。中心輸入與跨度在div
這裏是代碼
div class="inner-right2-calendar" style="text-align: center">
<div class="input-group date" style="display: inline-block;" id="picker">
<input id="startAppointment" type="text" class="form-control" placeholder="Enter Start Appointment"/>
<span style="width: 20px; height: 33px;" class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
<div class="input-group date" style="padding-left: 130px; margin-top: 20px;" id="picker2">
<input id="endAppointment" type="text" class="form-control" placeholder="Enter End Appointment" />
<span style="width: 20px; height: 33px;" class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
這裏是inner-right2-calendar
.inner-right2-calendar {
background: #fafafa;
border-top-left-radius: 5px;
margin-top: 20px;
border-top-right-radius: 5px;
height: 30%;
width: 100%;
position: relative;
CSS}
.input-group {
位置:相對;
border-collapse:separate; }
我需要在父母的div
我嘗試用text-align
父DIV和display: inline-block;
爲孩子們做居中class="input-group date"
。
但現在我看到這個
我怎樣才能居中?
提供了一個鏈接或創建一個小提琴 –
你想按鈕在中心? – Aslam
輸入和跨度域@ hunzaboy –