Syk Syk - 4 years ago 145
CSS Question

CSS on bootstrap tables not working

I use following css in my table:

.lh1 {
line-height: 50px;
}


And my table looks like this:

<table class="table table-bordered lh lh1">
..
..
..
</table>


But no matter which value I use for line-height, my table doesn't change at all. Other .css in this table is working fine.

What could be the cause of that problem?

Answer Source

You need to do it like this.

CSS

.lh1 > tbody > tr > td {
    line-height: 50px;
    }

your CSS is not overwriting the bootstrap CSS. Here is the demo

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download