• Hello,
    I’m using Flat Theme by the ShapeBootstrap team.
    The website i’m building is this: http://www.autoscuolecorinaldesi.it/
    I’m adding a text in the bottom section, just above the Powr map widget.
    Problem is, as you can see, the text only displays in the left side. Already tried to center it with align=center, <center>, etc, with no luck.
    Know any other way to make it appear in the center of the page, just like the map widget?
    Thank you very much.
    Suspicio

Viewing 14 replies - 1 through 14 (of 14 total)
  • The text is wrapped in a div element with the following classes col-sm-3 col-xs-6

    It also needs a col-md-12

    This CSS:
    .col-sm-3.col-xs-6 {
    margin: auto;
    float: none;
    }

    Hello @suspicio

    Please add the class <div class="col-sm-12 col-xs-6">on the place <div class="col-sm-3 col-xs-6">

    http://i.is.cc/2D4wbi6N.png

    Thanks.

    Oh right, Bootstrap. Go with luckychingi’s solution.

    Thread Starter suspicio

    (@suspicio)

    Thank you very much guys!
    Err… sorry, i’m quite noob, where exactly do i edit the div classes?
    Thanks again!

    align=center and <center> are not valid HTML5 tags.
    you can use <p class=”text-center”>your text</p>
    as text-center is a Bootstrap class for centering text

    Thread Starter suspicio

    (@suspicio)

    I’m inside the wordpress pages editor but can’t find the div row to edit it. In what page should it be?

    Seems like the code is in footer.php

    Look for code starting with <section id="bottom" class="wet-asphalt">

    Do not edit the theme file (unless you are the theme developer), Create a child theme & Modify

    • This reply was modified 6 years, 9 months ago by luckychingi.
    Thread Starter suspicio

    (@suspicio)

    Thank you luckychingi.

    In footer.php i have

    <section id="bottom" class="wet-asphalt">
      <div class="container">
        <div class="row">
          <?php dynamic_sidebar('bottom'); ?>
        </div>
      </div>
    </section>

    How exactly should i edit it?

    ok, so the code is coming from functions.php then.

    In functions.php, search for the function dynamic_sidebar

    The text widget would be wrapped in <div class="col-sm-3 col-xs-6">

    Note: This might affect other widgets and would need a conditional check

    Thread Starter suspicio

    (@suspicio)

    Dynamic sidebar doesn’t exist in functions.php…

    Only thing i found is

    // registering sidebar
    
    register_sidebar(array(
      'name' => __( 'Sidebar', ZEETEXTDOMAIN ),
      'id' => 'sidebar',
      'description' => __( 'Widgets in this area will be shown on right side.', ZEETEXTDOMAIN ),
      'before_title' => '<h3>',
      'after_title' => '</h3>',
      'before_widget' => '<div>',
      'after_widget' => '</div>'
      )
    );
    
    register_sidebar(array(
      'name' => __( 'Bottom', ZEETEXTDOMAIN ),
      'id' => 'bottom',
      'description' => __( 'Widgets in this area will be shown before Footer.' , ZEETEXTDOMAIN),
      'before_title' => '<h3>',
      'after_title' => '</h3>',
      'before_widget' => '<div class="col-sm-3 col-xs-6">',
      'after_widget' => '</div>'
      )
    );

    I tried to edit before_widget to the code you gave me but with no luck.

    Thread Starter suspicio

    (@suspicio)

    Oops, i had forgot to center it.
    Now it works.
    Thank you very much lucky and thank you everybody else!

    register_sidebar(array(
      'name' => __( 'Bottom', ZEETEXTDOMAIN ),
      'id' => 'bottom',
      'description' => __( 'Widgets in this area will be shown before Footer.' , ZEETEXTDOMAIN),
      'before_title' => '<h3>',
      'after_title' => '</h3>',
      'before_widget' => '<div class="col-sm-3 col-xs-6 col-md-12">',
      'after_widget' => '</div>'
      )
    );

    @luckychingi
    Your bootstrap classes should be in order from xs-lg

    col-xs-6 col-sm-3 col-md-12

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Addign text on bottom section’ is closed to new replies.