Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created October 23, 2017 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LeaVerou/4c9499df3f578b75a5a777e058e48adf to your computer and use it in GitHub Desktop.
Save LeaVerou/4c9499df3f578b75a5a777e058e48adf 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;
}
div {
background: orange;
position: absolute;
top: 0;
left: 0;
padding: 20px;
}
<table>
<tr>
<td>bar</td>
<div>foo</div>
</tr>
</table>
foo.style.color = "blue";
console.log(foo.getAttribute("style"));
{"view":"split-vertical","fontsize":"110","seethrough":"","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment