Does anyone know how to center my container to be center. I try to align my code to be center but it doesn’t apply the code. I try to change it but it doesnt work. Do I miss something? It show like this.
I want it to be center but it doesnt work. Here is my html code.
<div class="row">
<div class="col-md-8" style="margin-top: 30px;">
<div class="card" style="font-size: 100px; text-align: center; height: 100px;">
<div class="card-body">
</div>
<div class="card-footer">
<div class="row">
<div class="col-md-12">
2
Answers
You have applied
text-center
property on body, but according to screenshot data is on footerinstead apply style on
<div class="card">
check the snippet aboveUpdate:
I edited your code to a static html to test it out.
I can see that your code is working, but you can try to add
text-align: center;
in order to make everything in the container centered.Below is the full code, and you can test it here too: https://codesandbox.io/s/festive-hopper-73v528?file=/index.html
and here’s a live preview: https://73v528.csb.app/