html - vertically align text to the middle of my column divs -


alright, here go. i'm pretty new html , bootstrap, bare me. want vertically align text inside rows middle. you'll see have lg column going across page. text have in block quote defaulting top or upper vertical alignment. add single style attribute below not seem fixing issue. need using css , linking it?

<div class='nav-wrapper container'>         <div class='row'>             <div class="col-lg-12" style="vertical-align:bottom">                 <center>                     <blockquote cite="https://www.brainyquote.com/quotes/quotes/h/hippocrate133222.html">                         <i>healing matter of time, matter of opportunity.</i>                     </blockquote>                 </center>             </div>         </div> 

save yourself! don't use bootstrap if new html! can still out unscathed... + <center> tag unsupported , deprecated. horizontal, begin with. there 6 ways center , have best use-cases. cannot use inline-block type rules vertical align on 'block' level elements.

here 2 ways. bet need think padding differently.

.padding-style {    border: 1px solid blue;    text-align: center;    padding: 40px 0; /* top/bottom   left/right */  }    .flexbox-style {    border: 1px solid red;    display: flex;    justify-content: center;    align-items: center;    min-height: 140px; /* arbitrary height */  }    h1 {    display: inline-block;    border: 1px solid green;  }
<section class='padding-style'>    <h1>centered thing</h1>  </section>    <section class='flexbox-style'>    <h1>centered thing</h1>  </section>


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -