Skip to content

Commit 6388724

Browse files
committed
document IE9 hack
1 parent fa99561 commit 6388724

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,27 @@ All this work is based on the following assumptions:
9595

9696
var app = angular.module('app', ['wt.responsive']);
9797

98+
## Special cases
99+
100+
### IE9 responsive hack
101+
102+
Because IE9 doesn't handle correctly a `display` CSS rule for `<td>`, if you need to support it, you can use the following style, only for IE9:
103+
104+
```css
105+
<!--[if IE 9]>
106+
<style>
107+
/* rules for IE9 only */
108+
.responsive {
109+
overflow: hidden;
110+
}
111+
.responsive td:nth-child(odd), .responsive td:nth-child(even) {
112+
float: left;
113+
width: 100%;
114+
}
115+
</style>
116+
<![endif]-->
117+
```
118+
98119
## Credits
99120

100121
CSS based on original work by Chris Coyier (http://css-tricks.com/responsive-data-tables/). In this article, he covers approaches to responsive tables. I modified it to work around CSS specificity and to keep things DRY.

examples/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
<!DOCTYPE html>
22
<html ng-app="app">
33
<head>
4+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
45
<script src="../bower_components/angular/angular.js"></script>
56
<script src="../release/angular-responsive-tables.js"></script>
67
<script src="controller.js"></script>
78
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
89
<link rel="stylesheet" href="../release/angular-responsive-tables.css">
10+
11+
<!--[if IE 9]>
12+
<style>
13+
/* rules for IE9 only */
14+
.responsive {
15+
overflow: hidden;
16+
}
17+
.responsive td:nth-child(odd), .responsive td:nth-child(even) {
18+
float: left;
19+
width: 100%;
20+
}
21+
</style>
22+
<![endif]-->
923
</head>
1024
<body ng-controller="TestController as ctrl">
1125
<h1>Angular Responsive Tables</h1>

0 commit comments

Comments
 (0)