Skip to content

Instantly share code, notes, and snippets.

@leechy
Created February 1, 2012 15:11
Show Gist options
  • Save leechy/1717460 to your computer and use it in GitHub Desktop.
Save leechy/1717460 to your computer and use it in GitHub Desktop.
Table resized by image
/**
* Table resized by image
*/
body, html {
height: 100%;
margin: 0;
}
div {
border: 1px solid red;
position: relative;
height: 30%;
border-radius: 20px;
}
table {
border: 1px solid blue;
position: absolute;
height: 100%;
}
td {
height: 100%;
}
img {
border: 1px solid green;
height: 100%;
}
<div>
<table>
<tbody>
<tr>
<td>
<img src="http://l2.ru/mail/2012-01-26/d-t.gif" />
</td>
</tr>
</tbody>
</table>
</div>
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment