JSFiddle - React, Tailwind, and code Playground

by DannyEnglander

HTML

<table>
    <tr><td>this a table</td></tr>
    <tr><td>this is a contents</td></tr>
    <tr id="tableElement"><td>of element</td></tr>
</table>

CSS

td {
    height:20px;
    border-top:10px solid green;
    border-bottom:10px solid yellow;
}

JavaScript

console.log( $('td').css('border-top').split('p')[0] );
console.log( $('td').css('border-bottom').split('p')[0] );
console.log( $('td').height() );
console.log( $('td').outerHeight() );
console.log( $('tr').outerHeight() );
console.log( $('tr').outerHeight(true) );
console.log( document.getElementById("tableElement").offsetHeight );
console.log( document.getElementById("tableElement").clientHeight );