【问题标题】:can't make div items to take the full length of it不能让 div 项目占据它的全部长度
【发布时间】:2020-02-10 18:47:15
【问题描述】:

我试图将项目放置在 div 的中心,但它不起作用

这是所需输出的图片

我不知道为什么 div 项目会离开,输入文本没有占 div 的全长 我还试图在文本和橙色按钮的齿轮图标之间添加空格

这是我的代码:

<af:dialog contentWidth="400" type="none" id="aaa" modal="true">
    <div class="row">
        <div class="col-md-8 sm-b-b">
            <div class="sm-padding-5">
                <af:inputText inlineStyle="display: inline-block;width:100%" value="sohoooooooooooooooooo"
                              simple="true" id="it1"/>
            </div>
        </div>
        <div class="col-md-4 sm-b-b">
            <div class="sm-padding-5">
                <af:button inlineStyle="display: inline-block;width:100%" text="Search" id="b1"></af:button>
            </div>
        </div>
    </div>
    <af:forEach var="node" items="#{bindings.ViewObj11.collectionModel}">
        <div class="row">
            <div class="col-md-12 sm-b-b">
                <div class="sm-padding-5">
                    <af:link text="#{bindings.Value1.inputValue}" styleClass="btn btn-primary white" id="ot1">
                        <span aria-hidden="true" class="fa fa-gear"></span>
                    </af:link>
                </div>
            </div>
        </div>
    </af:forEach>

【问题讨论】:

    标签: css bootstrap-4 font-awesome


    【解决方案1】:

    在你的样式表中试试这个样式

     .sm-b-b{
       margin: 0 auto;
       text-align: center;
       width: 100%;
     }
    

    【讨论】:

      猜你喜欢
      • 2017-11-30
      • 2020-03-07
      • 1970-01-01
      • 2022-01-25
      • 1970-01-01
      • 2013-06-02
      • 2021-12-14
      • 2022-07-11
      • 2023-01-15
      相关资源
      最近更新 更多