簡體   English   中英

如何水平增加此div的背景

[英]How to Increase background of this div horizontally

我無法增加此div的背景寬度。 我不知道為什么,我需要幫助。 請檢查此鏈接上的圖像
這是頁面鏈接http://1.edbdigital.pro/

我想水平延長背景(寬度:100%)並將其內容居中

HTML

<div class="symple-callout symple-clearfix  ">
        <div class="symple-callout-caption">Peça agora um orçamento para seu projeto
        </div>
        <div class="symple-callout-button">
            <a href="#" class="symple-button large blue" title="Visit Site" style="border-radius:5px" rel="nofollow" target="_blank">
            <span class="symple-button-inner" style="border-radius:5px">PEDIR ORÇAMENTO</span>
            </a>
        </div>
    </div> 

的CSS

.symple-callout { padding: 20px 30px; background: #f1f1f1; position: relative; border-radius: 0px; width: 100%}
.symple-callout-caption { float: left; font-size: 2.6em; font-weight: 400; width: 80%; color: #555; line-height: 100%; }
.symple-callout-button { float: right;}


.symple-callout-caption { text-align: center }
.symple-callout-caption { float: none; font-size: 1.6em; font-weight: 400; width: 100%; color: #555; }
.symple-callout-button { position: inherit; right: auto; top: auto; margin: 20px auto 0; text-align: center; }

.symple-clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }

謝謝

有一個具有固定寬度的容器<div class="section mcb-section"> ,該容器不允許內部塊的寬度大於1200px:

@media only screen and (min-width: 1240px)
.section_wrapper, .container {
    max-width: 1200px; //this line
}

您可以將容器分成兩個包裝,然后在其中插入<div class="symple-callout-caption">塊,如下所示:

<div class="section mcb-section">
....
</div>

<div class="symple-callout symple-clearfix">
...
</div>

<div class="section mcb-section">
....
</div>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM