javascript - bootstrap 3 center div in CELL -


i'm using bootstrap 3 , want center div within cell in container row. when looked found topics centering div in container not need. want know how center div (both vertically , horizontally) in particular cell is. reason on same row have other divs of bigger height , @ end of row want put button relatively small compared other divs , hence want center make pretty.

what i've tried until go bootstrap.min.css file , change following:

.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{ padding:8px; line-height:1.42857143; vertical-align:top; border-top:1px solid #ddd} 

to:

.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{ padding:8px; line-height:1.42857143; vertical-align:middle; border-top:1px solid #ddd} 

which didn't seem change i'm guessing i'm not on right track.

for center-ing div horizontally, can put in css file:

margin-left: auto; margin-right:auto; 

for vertical alignment:

margin-top: auto; margin-bottom: auto; 

posting html code helpful btw.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -