JSFiddle - React, Tailwind, and code Playground
by justinwinter
HTML
<body>
<div class="row">
<div class="column1">
<body translate="no">
<table>
<tr>
<td>
<div class="container">
<ul>
<li class="dropdown">
<input type="checkbox" />
<a href="#" data-toggle="dropdown">Terms of Employment</a>
<ul class="dropdown-menu">
<li><a href="#01">At-Will Employment</a></li>
<li><a href="#02">Equal Employment Opportunity<br>and Discrimination Policy</a></li>
<li><a href="#03">Policy against Harassment</a></li>
<li><a href="#04">No Dating Policy</a></li>
<li><a href="#05">Hours of Work</a></li>
<li><a href="#06">Overtime</a></li>
<li><a href="#07">Make-Up Time</a></li>
<li><a href="#08">Meal and Rest Periods</a></li>
<li><a href="#09">Payment of Wages</a></li>
<li><a href="#10">Job Duties</a></li>
<li><a href="#11">Personnel Records</a></li>
<li><a href="#12">Open Door Policy</a></li>
</ul>
<!-- ********************************************************************** -->
<li class="dropdown">
<input type="checkbox" />
<a href="#" data-toggle="dropdown">Company Standards and Rules</a>
<ul class="dropdown-menu">
<li><a href="#">Standards of Conduct</a></li>
<li><a href="#">Prohibited Actions<br>and/or Improper Behavior</a></li>
<li><a href="#">Business Ethics Policy</a></li>
<li><a href="#">Substance Abuse Policy</a></li>
<li><a href="#">Punctuality and Attendance</a></li>
<li><a href="#">Dress Code</a></li>
<li><a href="#">Publicity/Statements to the Media</a></li>
<li><a href="#">Confidentiality</a></li>
<li><a href="#">Conflict of Interest</a></li>
<li><a href="#">Dedication of Services</a></li>
<li><a href="#">Notice of Applicant Background...
CSS
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Calibri, Helvetica, sans-serif;
font-size: 17px;
}
/* Create two equal columns that floats next to each other */
.column1 {
float: left;
position: fixed;
width: 30%;
padding: 10px;
}
.column2 {
float: right;
width: 70%;
padding: 10px;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
.container {
margin:auto;
font-family: Calibri, Helvetica, sans-serif;
font-size: 17px;
font-variant: small-caps;
}
.container > ul {
list-style: none;
padding: 0;
margin: 0 0 20px 0;
}
.dropdown {
position: relative;
}
.dropdown a {
text-decoration: none;
}
.dropdown [data-toggle="dropdown"] {
display: block;
color: #000000;
padding: 5px;
margin: 0 0 2px 0;
}
.dropdown [data-toggle="dropdown"]:before {
position: absolute;
display: block;
/*content: '\25BC';*/
font-size: 17px;
color: #fffFFf;
top: 2px;
right: 16px;
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
-moz-transition: -moz-transform 0.6s;
-o-transition: -o-transform 0.6s;
-webkit-transition: -webkit-transform 0.6s;
transition: transform 0.6s;
}
.dropdown > .dropdown-menu {
max-height: 0;
overflow: hidden;
list-style: none;
padding: 0;
margin: 0;
-moz-transform: scaleY(0);
-ms-transform: scaleY(0);
-webkit-transform: scaleY(0);
transform: scaleY(0);
-moz-transform-origin: 50% 0%;
-ms-transform-origin: 50% 0%;
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-moz-transition: max-height 0.6s ease-out;
-o-transition: max-height 0.6s ease-out;
-webkit-transition: max-height 0.6s ease-out;
transition: max-height 0.6s ease-out;
animation: hideAnimation 0.4s ease-out;
-moz-animation: hideAnimation 0.4s ease-out;
-webkit-animation: hideAnimation 0.4s ease-out;
}
.dropdown >...
JavaScript
var $scrollingDiv = $("#scrollingDiv");
$(window).scroll(function(){
if ($(window).scrollTop()>220) {
$scrollingDiv
.css("position",'fixed' )
.css("top",'46px' )
} else {
$scrollingDiv
.css("position",'' )
.css("top",'' )
}
});