I was starting to write a mock-up for a project. Basically, I use bootstrap grids to get a structure like this:
<div class="container-fluid">
<div class="row">
<div class="col-xs-2">...</div>
<div class="col-xs-6">Main Title</div>
<div class="col-xs-4">...</div>
</div>
</div>
Here is a complete fiddle: https://jsfiddle.net/f8fn9Los/4/
What I want to do is to center the Main title, not in its column but in the whole row. Is there any way to do this, while keeping this grid structure?
Ps: I know I can do this in other ways, but I was just wondering if there is some way to achieve this with grid.
Thanks!
this would be what your looking for.
<section>
<div class="container">
<div class="row">
<div class="col-xs-12 center-block text-center">
<h1>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</div>
</div>
</section>
See you have already used .text-center
on you .project-name
which align text to center
, so what I could suggest is that try pseudo selector ::before
as below,
.text-center::before{
content:"";
margin-left:calc(100% - 75%);
}
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