Skip to content

Instantly share code, notes, and snippets.

@pofigizm
Created December 20, 2014 23:01
Show Gist options
  • Save pofigizm/542f2d56790c95a6ecc5 to your computer and use it in GitHub Desktop.
Save pofigizm/542f2d56790c95a6ecc5 to your computer and use it in GitHub Desktop.
Yandex/Q5 // source http://jsbin.com/tudowa
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Yandex/Q5</title>
<style>
table, tr, td {
border:1px solid;
text-align: center;
padding: 10px;
}
div {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
</style>
</head>
<body>
<table>
<tr id='headrow'>
<td>head 1</td>
<td>head 2</td>
<td>head 3</td>
<td>head 4</td>
<td>head 5</td>
<td>head 6</td>
<td>head 7</td>
<td>head 8</td>
<td>head 9</td>
<td>head 10</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
</table>
<script>
window.onload = function() {
var headrow = document
.getElementById('headrow')
.innerHTML
.replace(/\<td\>/g, '<td><div>')
.replace(/\<\/td\>/g, '</div></td>');
document.getElementById('headrow').innerHTML = headrow;
// we can calculate needed height
document.getElementById('headrow').style.height = '100px';
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment