JSFiddle - React, Tailwind, and code Playground

by kenyu73

HTML

<body>
    <table id='tblMain'>
        <tr id="row0">
            <td id="colWidth">
                <td></td>
        </tr>
        <tr id="row1">
            <td class='heading' colspan="2">KBase - Simple Knowledge Fast!</td>
        </tr>
        <tr id="row2">
            <td>
                <input id='ib_search' />
                <input id='btn_search' type='button' value='search' onclick='onClickBtnSearch();' />
            </td>
            <td>
                <input type='button' id='btn_new' value='new' onclick='onClickBtnNew();' />
                <input type='button' id='btn_edit' value='edit' onclick='onClickBtnEdit();' />
                <input type='button' id='btn_save' value='save' onclick='onClickBtnSave();' />
                <input type='button' id='btn_delete' value='delete' onclick='onClickBtnDelete();' />
            </td>
        </tr>
        <tr id="row3">
            <td>
                <div id="tabs">
                    <ul>
                        <li id="tab_search" onclick="onClickTabSearch();">Search</li>
                        <li id="tab_contents" onclick="onClickTabContents();">Contents</li>
                        <li id="tab_top_hits" onclick="onClickTabTopHits();">Top</li>
                    </ul>
                </div>
            </td>
            <td>
                <div style="width:99%; margin-right: 5px;">
                    <div>
                        <label id="labelName">Name:</label>
                        <input id='ib_name' />
                    </div>
                    <div>
                        <label id="labelKeywords">Keywords:</label>
                        <input id='ib_keywords' />
                    </div>
                </div>
            </td>
        </tr>
        <tr id="row4">
            <td>
                <div class="divContainer">
                    <div class="results" id="div_search_results"></div>
                    <div class="results" id="div_content_results"></div>
  ...

CSS

/***** element level CSS *****/
 body, html {
    height: 99%;
    width: 99%;
    margin:auto;
    /* auto centers body*/
    padding:0;
    border: 1px dashed green;
}
td {
    white-space: nowrap;
    border: 1px dashed red;
}
#colWidth {
    width: 400px;
}
tr {
    vertical-align: top;
}
#row0, #row1, #row2, #row3 {
    height: 1%;
}
#row4 {
    height:100%;
}
#row4 > td {
    height: 100%;
    /*** UGH, todo...***/
}
.divContainer {
    height: 100%;
    /*** UGH, todo...***/
    border: 1px solid #C8C8C8;
    margin: 2px;
    overflow: auto;
}
/***** class level CSS *****/
 .selected-color {
    color: black;
    font-weight: bold;
}
.selected-tab {
    background-color: LightSteelBlue;
}
.heading {
    text-align: right;
    background-color: LightSteelBlue;
    padding-right: 10px;
}
#div_contents {
    width: 100%;
    height:100%;
    white-space: pre;
    /* needed for Chrome to maintain tabs, spaces, etc */
}
.results {
    width: 100%;
    height:100%;
    white-space: nowrap;
}
.results_child {
    margin-left: 5px;
    cursor: pointer;
}
.fldr_parent {
    cursor:default;
    margin-left: 2px;
    margin-top: 2px;
}
.fldr_group {
    display: none;
    margin-left: 10px
}
.document_icon {
    background: url('../img/doc.png') no-repeat;
}
.folder_icon {
    background: url('../img/folder.png') no-repeat;
}
.sub_text {
    font-size: smaller;
    color: gray;
}
#tblMain {
    width: 100%;
    height:100%;
    border: 2px solid gray;
    table-layout: fixed;
    border-collapse: collapse;
    vertical-align: top;
}
#ib_search {
    width: 75%;
}
#ib_name, #ib_keywords {
    width: 100%;
}
#tabs {
    vertical-align: baseline;
    margin-bottom: -1px;
}
#row3 td:nth-child(1) {
    vertical-align: bottom;
}
#tabs ul {
    list-style-type: none;
    padding:0;
    margin:0;
}
#tabs li {
    display: inline;
    border: 1px solid gray;
    border-bottom: 1px solid white;
    margin-left: 5px;
    padding: 0 1em;
    border-radius: 5px 5px 0px 0px;
   ...