【问题标题】:Align on the left在左侧对齐
【发布时间】:2016-01-04 06:15:07
【问题描述】:

我有这个网站http://steam-to-rent.ch/,我需要将整个内容对齐在左侧(与徽标相同的行)。我正在使用引导网格,但在主页和此处http://steam-to-rent.ch/uber.html 我无法在左侧对齐。这是 HTML 代码:

<section id="services" class="section text-center home">
                <div class="container">

                        <div class="row">

                    <!-- SINGLE SERVICE -->
                        <div class="col-sm-12">
                            <div class="single-service text-left wow fadeInRight" data-wow-duration="1s" data-wow-delay=".6s">

                                <div class="service-content home">
                                    <h3 class="">Dampf wird überall gebraucht! </h3>
                                    <h4>Damit es wieder mit Volldampf voraus gehen kann</h4>
                                    <p>Die Einsatzgebiete für Dampf sind vielfältig. Sei es im Spital, der Universitätskantine, der Molkerei, der Wäscherei, der Lederverarbeitung, der Gummiherstellung, in der gesamten Lebensmittelindustrie, beim Gemüsebauer um Randen und Mais zu kochen, in der Futtermühle, der Getreidemühle oder in der Käserei. Mit unserer <b>Dampfkessel - Vermietung</b> helfen wir Ihnen schnell und kompetent bei Ausfällen, damit Sie Ihre Prozesse zügig wieder aufnehmen können. 
        </p>                     
                                </div>
                            </div>
                        </div>
                        <!-- END SINGLE SERVICE -->

                    </div>
                    <!--.row-->
                </div>
                <!--/.container -->
            </section>

【问题讨论】:

    标签: css html twitter-bootstrap grid alignment


    【解决方案1】:

    只需删除您在 css

    中提供的 ma​​rgin
    .single-service {
      margin:30px 25px;
    }
    
    .service-content {
      margin:65px;
    }
    

    【讨论】:

    • 真可惜。谢谢:)
    【解决方案2】:

    从您的 HTML 页面中删除 div 的 col-sm-12service-content

    col-sm-1215px 填充

    .service-content {
        margin-left: 65px; /* because of this 65px your content is shifted to left, so remove this value or avoid using this class in HTML */
        bottom: 0;
    }
    

    【讨论】:

    • 真可惜。谢谢:)
    猜你喜欢
    • 2014-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-25
    • 1970-01-01
    • 2021-01-15
    • 1970-01-01
    • 2015-02-22
    相关资源
    最近更新 更多