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.
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
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.
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
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.
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