第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何將 div 元素彼此相鄰放置?

如何將 div 元素彼此相鄰放置?

弒天下 2023-12-04 14:25:44
我是 CSS 初學(xué)者。在 JSP 頁面中,我有兩個位于彼此之下的 div。每個 div 都帶有一個字段、按鈕和一個表格。我需要將字段、表格和按鈕放置在彼此旁邊,而不是放在彼此下面。下面是我的 2 個 div 的 JSP。如何實現(xiàn)我想要的?第一個分區(qū):            <div class="panel panel-default">            <div class="panel-heading"><b><spring:message code="supportive.criterea.section.label"/></b></div>            <div class="panel-body ">                <div class="form-group col-lg-3 col-xs-12 float2">                  <c:forEach items="${serviceFields}" var="serviceField">                     <c:if test="${serviceField.columnName == 'v38'}">                         <label for="criterea">                               <c:choose>                                <c:when test="${i18n.language == 'en' }">${serviceField.labelEn}</c:when>                                <c:otherwise>${serviceField.labelAr}</c:otherwise>                              </c:choose>                                    <c:if test="${serviceField.isRequired == 1}">                                        <span class="required">&nbsp;</span>                               </label>                         <input type="text" value="${requestDetails.v38}"                                                   class="form-control input-sm <c:if test="${serviceField.isRequired == 1 && step.isStart == 1}"> mandatory</c:if>"                              name="v38" id="criterea" <c:if test="${step != null && step.isStart != 1}"> disabled</c:if> />                     </c:if>                  </c:forEach>              </div>
查看完整描述

2 回答

?
胡子哥哥

TA貢獻(xiàn)1825條經(jīng)驗 獲得超6個贊

創(chuàng)建一個容器 div,您的兩個 div 都位于其中。這個 div 必須是display:flexand flex-direction:row:


<div style="display:flex; flex-direction:row">

<div id="firstdiv"></div>

<div id="seconddiv"></div>

</div>

另一種解決方案是添加display:inline-block到您的兩個 div 中


查看完整回答
反對 回復(fù) 2023-12-04
?
溫溫醬

TA貢獻(xiàn)1752條經(jīng)驗 獲得超4個贊

<div class="d-flex">

   <div class="innerDiv"></div>

   <div class="innerDiv"></div>

</div>

<style>

.d-flex {

    display: -webkit-box;

    display: -ms-flexbox;

    display: flex;

    -ms-flex-wrap: wrap;

    flex-wrap: wrap;

    margin-right: -15px;

    margin-left: -15px;

}`

.innerDiv {

   padding-left: 15px;

   padding-right:15px;

}


</style>



查看完整回答
反對 回復(fù) 2023-12-04
  • 2 回答
  • 0 關(guān)注
  • 151 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號