The footer in my webpage is aligned to the center.
<div id="footer">
<div class="container">
<p class="text-muted credit" style="color:#fff">xyz</p>
</div>
</div>
This code works perfectly for other pages but for this particular page it doesn't work. This page contains a fullcalender UI that I have plugged but I doubt that has anything to do with my issue.
Add class . text-center to the parent div to align text or any item inside to the center. You can also decide how the alignment should look like on the specific screen sizes.
use container class of bootstrap. For Bootstrap use justify-content-center.
HTML | <tfoot> align Attribute left: It sets the table footer text left-align. right: It sets the table footer text right-align. center: It sets the table footer text center-align.
Try adding the "text-center" class to the container. So you will end up with this:
<div id="footer">
<div class="container text-center">
<p class="text-muted credit" style="color:#fff">xyz</p>
</div>
</div>
See if that works. Otherwise, maybe paste your markup for the page so that we can look at it. It would also be helpful if you inspected the footer element with chrome for example and attached the screenshot of it.
For me with Bootstrap 3 don't forget to specified col-md-12 col-sm-12 and col-xs-12 to work.
Other things avoid using style="color:#fff"
it breaks color theme. Use navbar-text
instead. So you should have something like this :
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container text-center">
<p class="navbar-text col-md-12 col-sm-12 col-xs-12">© xyz</p>
</div>
</nav>
Last word, use container
and not container-fluid
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With