如何在线显示元素?

问题描述 投票:0回答:2

嗨我有CSS的小问题,不知道如何解决。

在我的WHMCS template上,我想更多地实现一个元素,现在有一个元素在下面一行(获得支持)。如何解决这个问题?

enter image description here

这是来自该元素的CSS:

.home-shortcuts {
margin: 0;
/*background:#25a2c7;*/
background: #5E35B1;
padding-left: 250px;
margin-top: -60px;
color: #fff
}

这是来自header.tpl文件的代码

<div class="col-sm-12 col-md-8">
                <ul>
                     <li>
                        <a id="btnOrderHosting" href="cart.php">
                            <i class="fa fa-headphones"></i>
                            <p>
                                Créer une radio <span>&raquo;</span>
                            </p>
                        </a>
                    </li>
                    {if $registerdomainenabled || $transferdomainenabled}
                        <li>
                            <a id="btnBuyADomain" href="domainchecker.php">
                                <i class="fa fa-globe"></i>
                                <p>
                                    {$LANG.buyadomain} <span>&raquo;</span>
                                </p>
                            </a>
                        </li>
                    {/if}
                    <li>
                        <a id="btnOrderHosting" href="cart.php">
                            <i class="fa fa-hdd-o"></i>
                            <p>
                                {$LANG.orderhosting} <span>&raquo;</span>
                            </p>
                        </a>
                    </li>
                    <li>
                        <a id="btnMakePayment" href="clientarea.php">
                            <i class="fa fa-credit-card"></i>
                            <p>
                                {$LANG.makepayment} <span>&raquo;</span>
                            </p>
                        </a>
                    </li>
                    <li>
                        <a id="btnGetSupport" href="submitticket.php">
                            <i class="fa fa-envelope-o"></i>
                            <p>
                                {$LANG.getsupport} <span>&raquo;</span>
                            </p>
                        </a>
                    </li>
                </ul>
            </div>

一些建议如何在一行中显示所有?

css css-selectors whmcs whmcs-invoice-template
2个回答
2
投票

您可以看到您的li元素宽度为24%。将它们减少到20%(100/5 = 20,您的列表中有五个项目)。而已。

.home-shortcuts li {
  width: 20%;
}

2
投票

.home-shortcuts{padding-left:0;}
.home-shortcuts .container{width:60%;}
.home-shortcuts li {
  width: 20%;
}

使col-md-12而不是col-md-8它会来fineenter image description here

© www.soinside.com 2019 - 2024. All rights reserved.