簡體   English   中英

一行3格

[英]line 3 divs on one line

我正在嘗試使於同一行,而不是默認的3行。

我試圖添加顯示:inline-block; 這沒有什么區別,我也曾嘗試在divs周圍放置一個容器,但這沒有任何區別。

我沒有太多的CSS經驗,但我確實了解。 我想知道是否有更多經驗的人可以提供幫助。

    <!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="//digital-realms.us12.list-manage.com/subscribe/post?u=b3dcff09f16684d5f73852c78&amp;id=af1750ad39" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <div id="mc_embed_signup_scroll">

<div>Sign up to free e-Mail alerts for the latest news, offers & more: </div>
<div class="mc-field-group">
    <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
    <div id="mce-responses" class="clear">
        <div class="response" id="mce-error-response" style="display:none"></div>
        <div class="response" id="mce-success-response" style="display:none"></div>
    </div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;"><input type="text" name="b_b3dcff09f16684d5f73852c78_af1750ad39" tabindex="-1" value=""></div>
    <div class="clear opt-in" "><input type="submit" value="Sign Up" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </div>
</form>
</div>

<!--End mc_embed_signup-->

謝謝。

ps:代碼來自MailChimp,它們設置了類,因此我沒有自己的CSS。

使用以下html

 .parent { width: 100%; } .block1 { width: 30%; float: left; padding-right: 10px; } .block2 { width: 30%; float: left; padding-right: 10px; } .block3 { width: 30%; float: left; } 
 <div class="parent"> <div class="block1">Content 1</div> <div class="block2">Content 2</div> <div class="block3">Content 3</div> </div> 

您可以更改寬度。 並將您的html插入內容1,內容2,內容3

暫無
暫無

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

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