Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 83167

How to `vertical-align:middle` content inside td and th

$
0
0

(Mainly for small screens displays..)
The content text isn't in the middle of the cells

TDs are set by css to:

.table td, .table th {
    padding: 1rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

and THs to:

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

I have currently set this to solve it:

#datatable{

    td, th {
        vertical-align: middle;
    }
}

And I was wondering if there is a better way to do this via datatable js settings...


Viewing all articles
Browse latest Browse all 83167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>