cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


Save Automatically?

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.

<html ng-app="tests">
    <meta charset="UTF-8" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular.min.js"></script>
    <center><h1>The table</h1></center>
         <div class="contDiv" ng-controller="sampCtrl">
          <div class="heaaderDiv">
                <td class="tdFixed" >Row </td>
                <td class="tdFixed" ng-repeat="data in tableHeaders track by $index">{{data}}</td>

          <div class="bottomDiv" fix-on-scroll fixed-div=".heaaderDiv">
              <tbody ng-repeat="data in tableData track by $index">
              <td>Row: {{$index}}</td>
              <td ng-repeat="td in data">{{td}}</td>
              .contDiv {width:400px; padding: auto; margin: auto;}
.heaaderDiv {width:400px; overflow: hidden;}
.bottomDiv {width:400px; height: 200px; overflow: scroll; }
.bottomDiv tbody:nth-child(odd) {background: #aaaaaa}

.tdFixed {border: 1px solid #003300; padding: 2px; background: #003366; color: #ffffff; font-size: 14px;}
td {border: 1px solid #003300; padding: 2px; min-width:80px; width: 80px; font-size: 11px;}

              angular.module('tests', []);

angular.module('tests').controller('sampCtrl',function($scope) {
/// Nothing to see here - just dummy data to create the table
    $scope.tableData = [];
    $scope.tableHeaders = [];
    this.strTd = {};

    for (var th=0; th<=14; th++)
        this.strTd[th] = " Header "+th ;
    $scope.tableHeaders = this.strTd;

    this.strTd = {};
    for (var i=0; i<=30; i++){
        for (var td=0; td<=14; td++)
            this.strTd[td] = " TD: "+td ;

angular.module('tests').directive("fixOnScroll", function () {
    return function(scope, element, attrs) {
      var fixedDiv = attrs.fixedDiv;
        element.bind("scroll", function() {
                var leftPos = element.scrollLeft();
Loading ..................