Skip to content

Instantly share code, notes, and snippets.

@SelenIT
Forked from LeaVerou/dabblet.css
Created October 27, 2017 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SelenIT/85ae2a32080e532bb9584e57be1a4792 to your computer and use it in GitHub Desktop.
Save SelenIT/85ae2a32080e532bb9584e57be1a4792 to your computer and use it in GitHub Desktop.
tr + positioning
/**
* tr + positioning
*/
tr {
position: relative;
outline: 1px solid black;
}
table {
width: 100%;
padding: 100px;
}
.foo {
background: orange;
position: absolute;
top: 0;
left: 0;
padding: 20px;
}
<table>
<tr>
<td>bar</td>
<td class="foo">foo</td>
</tr>
</table>
foo.style.color = "blue";
console.log(foo.getAttribute("style"));
{"view":"split-vertical","fontsize":"110","seethrough":"","prefixfree":"","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment