Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="page-wrap">
  <img class="big-image" src="http://summit.qwantech.com/img/summit-big.png" alt="" />
  <div class="header">
    <img src="http://summit.qwantech.com/img/summit-white.png" alt="" />
    <div class="input-wrap">
      <input type="text" placeholder="Search..."/>
    </div>
    <div class="header-right">
      <div class="dropdown">
        <div class="selected">Craig Dykstra</div>
        <div class="menu">
          <div class="item">Settings</div>
          <div class="item">Logout</div>
        </div>
      </div><div class="dropdown">
        <div class="selected">Inventory</div>
        <div class="menu">
          <div class="item">Inventory</div>
          <div class="item">Fuelman</div>
          <div class="item">Contrac</div>
          <div class="item">Care</div>
          <div class="item">Admin</div>
          <div class="item">Registration</div>
        </div>
      </div>
    </div>
  </div>
  <div class="tabs">
    <div class="tab">People</div><div class="tab">Projects</div><div class="tab selected">Purchase Orders</div><div class="tab">Equipment</div><div class="tab">Vendors</div><div class="tab">Reports</div>
  </div>
  <div class="side-bar">
    <div class="side-bar-section">
      <div class="side-bar-item title-item">Create New...</div>
    </div>
    <div class="side-bar-section">
      <div class="side-bar-item title-item">Recent Items</div>
      <div class="side-bar-item">Greg Hill</div>
      <div class="side-bar-item">PO3214</div>
      <div class="side-bar-item">DZ102</div>
    </div>
    <div class="side-bar-section">
      <div class="side-bar-item title-item">Recycle Bin</div>
    </div>
  </div>
  <div class="main-content">
    <div class="po-form">
      <div class="po-section">
        <h1>Purchase Order</h1>
      </div>
      <div class="po-section">
        <div class="reflow float-right">
          <h3 class="align-right">P/O Number (TBD)</h3>
          <h3 class="align-right">Rev. No 0</h3>
          <p><label>Req'd Date</label><span><select></select></span></p>
        </div>
        <div class="reflow float-left">
          <h3>Issued By Craig Dykstra</h3>
          <p><label>Project</label><span><select></select></span></p>
          <p><label>Order Date</label><span><select></select></span></p>
        </div>
        <div class="clear"></div>
      </div>
      <div class="break"></div>
      <div class="po-section">
        <div class="reflow float-left">
          <h3>Vendor</h3>
          <p><label>Name</label><span><select></select></span></p>
          <p><label>Address</label><span><input type="text" value="2532 John Street"/></span></p>
          <div>
            <p class="col-2"><label>City</label><span><input type="text" value="Thunder Bay"/></span></p>
            <p class="col-2"><label>Prov</label><span><input type="text" value="ON"/></span></p>
            <div class="clear"></div>
          </div>
          <p><label>Postal Code</label><span><input type="text" value="P7B 0V3"/></span></p>
          <div>
            <p class="col-2"><label>Phone</label><span><input type="text" value="1(807)624-8678"/></span></p>
            <p class="col-2"><label>Fax</label><span><input type="text" value="1(807)624-8660"/></span></p>
            <div class="clear"></div>
          </div>
          <p><label>Attention</label><span><input type="text" value="John Doe"/></span></p>
          <div class="break display-small"></div>
        </div>
        <div class="reflow float-right">
          <h3>Ship To</h3>
          <p><label>Name</label><span><select></select></span></p>
          <p><label>Address</label><span><input type="text"/></span></p>
          <div>
            <p class="col-2"><label>City</label><span><input type="text"/></span></p>
            <p class="col-2"><label>Prov</label><span><input type="text"/></span></p>
            <div class="clear"></div>
          </div>
          <p><label>Postal Code</label><span><input type="text"/></span></p>
          <div>
            <p class="col-2"><label>Phone</label><span><input type="text"/></span></p>
            <p class="col-2"><label>Fax</label><span><input type="text"/></span></p>
            <div class="clear"></div>
          </div>
          <p><label>Attention</label><span><input type="text"/></span></p>
          <p><label>Freight Via</label><span><input type="text"/></span></p>
        </div>
        <div class="clear"></div>
      </div>
      <div class="break"></div>
      <div class="po-section">
        <h3>Consumables</h3>
        <div id="consumables" class="consumables"></div>
        <h3>Equipment</h3>
        <div id="equipment" class="equipment"></div>
        <div class="totals float-right">
          <p><label class="bold">Sub-Total</label> <span>104953.16</span></p>
          <p><label>HST @ 13%</label> <span>13643.91</span></p>
          <p><label class="bold">Total Price</label> <span>118597.07</span></p>
        </div>
        <div class="clear"></div>
      </div>
      <div class="break"></div>
      <div class="po-section">
        <h3>Notes</h3>
        <textarea class="notes"></textarea>
        <h3>Attach Files</h3>
        <div class="file-box">
          <div class="attached-file">file1.pdf</div>
          <div class="attached-file">file2.pdf</div>
          <div class="clear"></div>
        </div>
      </div>
      <div class="po-section">
        <h3>Internal Notes</h3>
        <textarea class="internal-notes"></textarea>
      </div>
    </div>
  </div>  
</div>

              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Lato:400,700);

* {
  margin: 0;
  padding: 0;
  outline-color: #99a;
}

body {
  font-family: 'Lato', sans-serif;
  color: #333;
  font-size: 14px;
  background-color: #f2f2f2;
  /*background-image: url('http://65.39.4.189/img/stardust.jpg');*/
  background-image: url(https://subtlepatterns.com/patterns/ricepaper2.png);
  /*background-image: url('http://sachagreif.com/wp-content/themes/sgv3/images/bg.png');*/
}

.page-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: hsl(120, 50%, 30%);
  background-image: url('http://65.39.4.189/img/mochaGrunge.jpg');
  border-bottom: 1px solid hsl(120, 50%, 25%);
  z-index: 1;
}
.tabs {
  position: absolute;
  top: 61px;
  height: 25px;
  left: 0;
  right: 0;
  background-color: hsl(26, 76%, 58%);
  background-color: hsl(120, 5%, 49%);
  border-bottom: 2px solid hsl(26, 76%, 48%);
  border-bottom: 1px solid hsl(120, 5%, 39%);
  padding-left: 7px;
  text-align: center;
}
.side-bar {
  position: absolute;
  top: 87px;
  left: 0;
  width: 200px;
  bottom: 0;
  padding-top: 10px;
}
.main-content {
  position: absolute;
  left: 205px;
  top: 97px;
  bottom: 0;
  right: 0;
}

.big-image {
  position: absolute;
  z-index: -1;
  top: 20px;
  left: -300px;
  opacity: 0.25;
  -webkit-transform: rotate(22.5deg);
}

.header img {
  position: absolute;
  left: 0;
  top: 2px;
  height: 95%;
}
.header-right {
  position: absolute;
  right: 0;
  width: 250px;
  padding-right: 10px;
  padding-top: 18px;
  text-align: right;
}
.dropdown {
  position: relative;
  display: inline-block;
  color: hsl(120, 50%, 85%);
  background-color: hsl(120, 50%, 35%);
  border: 1px solid hsl(120, 50%, 25%);
  border-right: none;
  padding: 5px 7px;
}
.dropdown:last-child {
  border-right: 1px solid hsl(120, 50%, 25%);
}
.dropdown.selected .menu {
  display: block;
}
.dropdown .menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: -1px;
  width: 125px;
  background-color: hsl(120, 5%, 49%);
  border: 1px solid hsl(120, 5%, 39%);
  padding: 0 5px;
}
.dropdown .menu:before {
  content: "";
  position: absolute;
  top: -8px;
  right: 5px;
  border-bottom: 8px solid hsl(120, 5%, 39%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.dropdown .menu:after {
  content: "";
  position: absolute;
  top: -7px;
  right: 5px;
  border-bottom: 8px solid hsl(120, 5%, 49%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.dropdown .menu .item {
  padding: 5px;
  color: white;
  border-bottom: 1px solid hsl(120, 5%, 39%);
}
.dropdown .menu .item:last-child {
  border-bottom: none;
}

.input-wrap {
  position: absolute;
  left: 120px;
  right: 250px;
  max-width: 800px;
  margin: 15px auto;
}
.input-wrap input[type="text"] {
  width: 100%;
  border: none;
  border-radius: 2px 2px 3px 3px;
  padding: 5px 15px;
  border-bottom: 2px solid hsl(120, 50%, 25%);
  outline-color: transparent;
}

.tab {
  position: relative;
  display: inline-block;
  height: 100%;
  line-height: 25px;
  padding: 0 10px;
  border-right: 2px solid hsl(26, 76%, 48%);
  border-right: 1px solid hsl(120, 5%, 39%);
  color: white;
}
.tab:first-child {
  border-left: 2px solid hsl(26, 76%, 48%);
  border-left: 1px solid hsl(120, 5%, 39%);
}
.tab.selected {
  background-color: #e4e4e4;
  background-image: url(https://subtlepatterns.com/patterns/ricepaper2.png);
  color: #333;
  height: calc(100% + 1px);
}
/*.tab.selected:after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 5px;
  background-color: #e4e4e4;
}*/

.side-bar-section {
  margin-bottom: 10px;
  box-shadow: 0px 1px 3px #bbb;
  background-color: white;
  border: 1px solid #ccc;
  border-left: none;
  /*border-bottom: 2px solid hsl(251, 39%, 47%);*/
  /*border-bottom: 2px solid hsl(26, 76%, 48%);*/
  border-bottom: 2px solid hsl(120, 5%, 39%);
  border-radius: 0 2px 5px 0;
  overflow: hidden;
}
.side-bar-item {
  border-bottom: 1px solid #ccc;
  padding: 7px 5px 7px 10px;
}
.side-bar-item:first-child {
  /* background-color: hsl(120, 50%, 40%); */
}
.side-bar-item:last-child {
  border-bottom: none;
}
.side-bar-item.title-item {
  font-size: 1.1em;
  font-weight: bold;
}

.po-form {
  padding: 0 10px;
  max-width: 1000px;
  margin: 0 auto;
  border: 1px solid #ccc;
  background-color: white;
  margin-bottom: 10px;
  border-radius: 2px;
  box-shadow: 0px 2px 5px #bbb;
}

input[type="text"] {
  font-size: 1.2em;
  padding: 4px 5px;
  border: none;
  border-bottom: 1px dotted #999;
  font-family: 'Lato', sans-serif;
}
textarea {
  box-sizing: border-box;
  resize: none;
  font-size: 1.0em;
  padding: 5px;
  width: 100%;
  font-family: 'Lato', sans-serif;
}
select {
  font-size: 1.1em;
  padding: 5px;
  color: #333;
  font-family: 'Lato', sans-serif;
  border: 1px solid #ccc;
}

h3 {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 5px;
  padding-bottom: 3px;
  /* border-bottom: 1px solid #ccc; */
}
p {
  margin-bottom: 5px;
}

.clear {
  clear: both;
}

.bold {
  font-weight: bold;
}

.float-right {
  float: right;
}
.float-left {
  float: left;
}

.small-text {
  font-size: 0.8em;
  margin-bottom: 5px;
}

.break {
  /*width: 95%;
  border-top: 1px solid #ccc;
  margin: 10px auto;*/
}

.align-right {
  text-align: right;
}

.display-small {
  display: none;
}

.po-section {
  padding: 10px 0;
  border-bottom: 2px solid hsl(120, 50%, 40%);
  /*border: 1px solid #ccc;
  border-bottom: 3px solid hsl(120, 50%, 40%);
  border-radius: 3px 3px 5px 5px;
  margin-bottom: 5px;
  box-shadow: 0px 2px 5px #bbb;*/
}
.po-section:last-child {
  border-bottom: none;
}

.notes,
.internal-notes {
  height: 200px;
  border: 1px solid #ccc;
  margin-bottom: 5px;
  overflow: auto;
}

.equipment,
.consumables {
  margin-bottom: 10px;
}

.totals {
  text-align: right;
}
.totals span {
  display: inline-block;
  border-bottom: 1px dotted #999;
  width: 150px;
  font-size: 1.3em;
  padding: 3px;
  margin-left: 4px;
}

.reflow {
  width: 50%;
}
.reflow select.wide {
  display: block;
  margin: 0 auto 5px auto;
  width: 90%;
}
.reflow label {
  font-size: 0.85em;
  color: #999;
  float: left;
  width: 65px;
  margin-top: 7px;
  text-align: right;
}
.reflow span {
  display: block;
  overflow: hidden;
  padding: 0 10px;
}
.reflow input[type="text"], .reflow select {
  box-sizing: border-box;
  width: 100%;
}

.col-2 {
  float: left;
  width: 50%;
}

.file-box {
  border: 1px solid #ddd;
  padding: 5px;
}
.attached-file {
  position: relative;
  float: left;
  border: 1px solid #ddd;
  padding: 5px 30px 5px 5px;
  margin-right: 5px;
  cursor: pointer;
}
.attached-file:after {
  position: absolute;
  right: 10px;
  top: 3px;
  content: "x";
  color: #999;
  font-family: 'Lato', sans-serif;
}
.attached-file:hover {
  background-color: hsl(220, 50%, 90%);
}
.attached-file:hover.attached-file:after {
  color: hsl(0, 90%, 70%);
}

.div-table select {
  width: 100%;
  padding: 1px;
  /* margin-top: -4px; */
}
.t-cell-row:first-child select {
  margin-top: -4px;
}
.t-row {
  position: relative;
  border-bottom: 1px solid #c5c5c5;
  padding: 5px 0;
}
.t-row:first-child {
  border: 1px solid #ccd0cc;
  padding-bottom: 0px;
  background-color: hsl(120, 7%, 85%);
  padding: 0;
}
.t-row:hover {
  background-color: hsl(120, 7%, 91%);
}
.t-row:first-child:hover {
  background-color: hsl(120, 7%, 85%);
}
.t-row:hover .row-controls {
  display: block;
}

.row-controls {
  display: none;
  position: absolute;
  left: 50%;
  margin-left: -30px;
  bottom: -25px;
  width: 60px;
  height: 24px;
  border: 1px solid #c5c5c5;
  border-top: none;
  background-color: hsl(120, 7%, 91%);
  text-align: center;
  z-index: 1;
}
.t-head, .t-cell {
  position: relative; 
  box-sizing: border-box;
  float: left;
  width: 125px;
  padding: 3px 5px;
}
.t-cell input[type="text"] {
  width: 47px;
  font-size: 0.95em;
  margin: 0px 4px;
}

.t-head {
  /* white-space: nowrap; */
  overflow: hidden;
  font-weight: bold;
  text-transform: capitalize;
}

.t-cell-row:first-child {
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
  margin-bottom: 3px;
}
.t-head .t-cell-row:first-child {
  border-color: #bbb;
}

@media all and (max-width: 749px) {
  .col-2 {
    float: none;
    width: 100%;
  }
}
@media all and (max-width: 549px) {
  .reflow {
    width: 100%;
    display: block;
  }
  .display-small {
    display: block;
  }
}
              
            
!

JS

              
                $("select").append("<option>Select...</option>");



function convertData(oldData) {
  var metaData = [];
  var data = [];
  for (var i = 0; i < oldData.data.length; i++) {
    var item = oldData.data[i];
    var dataItem = [];
    if (item.type == "stacked") {
      var stackedArray = [];
      for (var j = 0; j < item.cols.length; j++) {
        var stackItem = item.cols[j];
        stackedArray.push({
          name: stackItem.name,
          type: stackItem.type,
          options: stackItem.options,
          inputs: stackItem.inputs,
        });
        
        for (var k = 0; k < stackItem.values.length; k++) {
          var dataPiece = data[k];
          if (dataPiece == undefined) {
            dataPiece = [];
            data[k] = dataPiece;
          }
          dataPiece.push(stackItem.values[k])
        }
      }
      metaData.push({type: "stacked", cols: stackedArray, width: item.width, style: item.style})
    } else {
      metaData.push({
        name: item.name,
        type: item.type,
        options: item.options,
        inputs: item.inputs,
        width: item.width,
        style: item.style
      });
      
      for (var j = 0; j < item.values.length; j++) {
        var dataPiece = data[j];
        if (dataPiece == undefined) {
          dataPiece = [];
          data[j] = dataPiece;
        }
        dataPiece.push(item.values[j])
      }
    }
  }
  return {metaData: metaData, data: data}
}

function createCellContents(cellMetaData, cellData, cellDiv) {
  cellDiv = cellDiv || document.createElement("div");
  
  if (cellMetaData.type == "select") {
    var selectElement = document.createElement("select");
    for (var i = 0; i < cellMetaData.options.length; i++) {
      var optionElement = document.createElement("option");
      var option = cellMetaData.options[i];
      optionElement.innerHTML = option;
      optionElement.value = option;
      selectElement.appendChild(optionElement);
    }
    selectElement.value = cellData;
    cellDiv.appendChild(selectElement);
  } else if (cellMetaData.type == "multiinput") {
    for (var i = 0; i < cellMetaData.inputs.length; i++) {
      var inputLabel = document.createElement("label");
      inputLabel.innerHTML = cellMetaData.inputs[i];
      cellDiv.appendChild(inputLabel);
      
      var inputElement = document.createElement("input");
      inputElement.type = "text";
      if (cellData !== undefined) {
        inputElement.value = cellData[i] || "";
      }
      cellDiv.appendChild(inputElement);
    }
  } else {
    if (cellData !== undefined) {
      cellDiv.innerHTML = cellData || "";
    } else {
      cellDiv.innerHTML = "Cell";
    }
    cellDiv.contentEditable = true;
  }
  
  return cellDiv;
}

function createTable(div, tableData) {
  div.className += " div-table";
  // prepass for widths
  var widthRemaining = 100;
  var specifiedWidths = 0;
  for (var i = 0; i < tableData.metaData.length; i++) {
    var colWidth = tableData.metaData[i].width;
    if (colWidth !== undefined) {
      widthRemaining -= colWidth;
      specifiedWidths++;
    }
  }
  widthRemaining /= 100;
  widthRemaining = ((widthRemaining/(tableData.metaData.length - specifiedWidths))*100) + "%";
  
  // add headers
  var tRow = document.createElement("div");
  tRow.className = "t-row";
  for (var i = 0; i < tableData.metaData.length; i++) {
    var tCell = document.createElement("div");
    tCell.className = "t-head";
    var cellMetaData = tableData.metaData[i];
    
    if (cellMetaData.type == "stacked") {
      for (var k = 0; k < cellMetaData.cols.length;  k++) {
        var cellRowData = cellMetaData.cols[k];
        var cellRow = document.createElement("div")
        cellRow.innerHTML = cellRowData.name;
        cellRow.className += " t-cell-row";
        tCell.appendChild(cellRow);
      }
    } else {
      tCell.innerHTML = cellMetaData.name;
    }

    // Apply the calculated width or passed width
    tCell.style.width = cellMetaData.width !== undefined ? cellMetaData.width + "%" : widthRemaining;

    // Apply the passed styles
    if (cellMetaData.style !== undefined) {
      for (var key in cellMetaData.style) {
        tCell.style[key] = cellMetaData.style[key]
      }
    }

    tRow.appendChild(tCell);
  }
  var clear = document.createElement("div");
  clear.className = "clear"
  tRow.appendChild(clear);
  div.appendChild(tRow);
  
  // populate table
  for (var i = 0; i < tableData.data.length; i++) {
    var tRow = document.createElement("div");
    tRow.className = "t-row";
    var currentCol = 0;
    for (var j = 0; j < tableData.metaData.length; j++) {
      var tCell = document.createElement("div");
      tCell.className = "t-cell";
      var cellMetaData = tableData.metaData[j];
      
      if (cellMetaData.type == "stacked") {
        for (var k = 0; k < cellMetaData.cols.length;  k++) {
          var cellRowData = cellMetaData.cols[k];
          var cellRow = createCellContents(cellRowData, tableData.data[i][currentCol]);
          cellRow.className += " t-cell-row";
          tCell.appendChild(cellRow);
          currentCol++;
        }
      } else {
        createCellContents(cellMetaData, tableData.data[i][currentCol], tCell);
        currentCol++;
      }
      
      // Apply the calculated width or passed width
      tCell.style.width = cellMetaData.width !== undefined ? cellMetaData.width + "%" : widthRemaining;

      // Apply the passed styles
      if (cellMetaData.style !== undefined) {
        for (var key in cellMetaData.style) {
          tCell.style[key] = cellMetaData.style[key]
        }
      }

      tRow.appendChild(tCell);
    }
    var clear = document.createElement("div");
    clear.className = "clear";
    var rowControls = document.createElement("div");
    rowControls.className = "row-controls";
    rowControls.innerHTML = "d x i";
    tRow.appendChild(rowControls);
    tRow.appendChild(clear);
    div.appendChild(tRow);
  }
}


var consumablesDiv = document.getElementById("consumables");
var consumablesData = {
    "metaData": [
        {
            "name": "item",
            "width": 5
        },{
            "name": "qty",
            "width": 5
        },{
            "name": "units",
            "type": "select",
            "options": [
                "each",
                "lot",
                "barrel",
                "litre",
                "spool",
                "ft²"
            ],
            "width": 10
        },{
            "name": "description",
            "width": 55
        },{
            "name": "unit price",
            "style": {
                "textAlign": "right",
                "fontWeight": "bold"
            }
        },{
            "name": "extended",
            "style": {
                "textAlign": "right",
                "fontWeight": "bold"
            }
        }
    ],
    "data": [
        [
            1,
            1,
            "spool",
            "ADS 4-in x 100-ft Corrugated Solid Pipe",
            "349.50",
            "349.50"
        ],[
            2,
            2,
            "each",
            "Shovel",
            "44.99",
            "89.98"
        ],[
            3,
            10,
            "barrel",
            "Mobil 1 synthetic 5w-30 oil",
            "649.99",
            "6499.90"
        ],[
            4,
            5,
            "each",
            "Stiletto hammer",
            "76.86",
            "384.30"
        ],[
            5,
            70,
            "ft²",
            "Fulton Gray Square Patio Stone",
            "1.15",
            "80.50"
        ]
    ]
}
createTable(consumablesDiv, consumablesData);

var equipmentData = {
    "metaData": [
        {
            "name": "item",
            "width": 4
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "description"
                },{
                    "name": "Rates",
                    "type": "multiinput",
                    "inputs": ["d","w","m"]
                }
            ],
            "width": 25
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "duration"
                },{
                    "name": "period",
                    "type": "select",
                    "options": ["","days","weeks","months"]
                }
            ],
            "width": 9
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "VIN/Serial #"
                },{
                    "name": "license plate"
                }
            ]
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "hours"
                },{
                    "name": "KM"
                }
            ],
            "width": 7
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "make"
                },{
                    "name": "model"
                }
            ]
        },{
            "type": "stacked",
            "cols": [
                {
                    "name": "purchase type",
                    "type": "select",
                    "options": ["3rd Party","Rental","Buyout","Owned"]
                },
                {
                    "name": "equipment type",
                    "type": "select",
                    "options": ["Compressor","Coating Unit","Dozer","Excavator","Generator","Heater","Heavy Truck","Jack Hammer","Loader","Light Tower","Telehandler","Office Trailer","Pipe Layer","Picker Truck","Rock Hammer","Sand Blaster","Trailer","Truck","Water Pump","Welder","Warehouse Van"]
                }
            ]
        },{
            "name": "replacement value",
            "width": 9,
            "style": {
                "textAlign": "right",
                "fontWeight": "bold"
            }
        },{
            "name": "Price",
            "width": 9,
            "style": {
                "textAlign": "right",
                "fontWeight": "bold"
            }
        }
    ],
    "data": [
        [
            1,
            "CAT 994H LARGE WHEEL LOADER",
            ["2000","13500","60000"],
            "7",
            "weeks",
            "893454342",
            "BDMC 016",
            "2406",
            "0",
            "Caterpillar",
            "994H",
            "Rental",
            "Loader",
            "250000",
            "94500.00"
        ],[
            2,
            "10,000-Watt 16 HP Gasoline Powered Electric Start Portable Generator with Wheel Kit Included",
            "",
            "N/A",
            "",
            "167412342",
            "",
            "0",
            "N/A",
            "Durostar",
            "XP10000E",
            "3rd Party",
            "Generator",
            "1099.99",
            "2199.98"
        ],[
            3,
            "80 gal. 3 Cylinder Single Stage Electric Air Compressor",
            "",
            "N/A",
            "",
            "543423423",
            "",
            "0",
            "N/A",
            "Husky",
            "C801H",
            "3rd Party",
            "Compressor",
            "849.00",
            "849.00"
        ]
    ]
}

var equipmentDiv = document.getElementById("equipment");
createTable(equipmentDiv, equipmentData);

              
            
!
999px

Console