Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created April 16, 2012 01:30
Show Gist options
  • Save LeaVerou/2395875 to your computer and use it in GitHub Desktop.
Save LeaVerou/2395875 to your computer and use it in GitHub Desktop.
WebKit bug with display:table + position:absolute
/**
* WebKit bug with display:table + position:absolute
* Incorrect width calculation
*/
div {
position: relative;
width: 300px;
height: 200px;
padding: 10px;
border: 1px solid silver;
}
span {
position: absolute;
top: 10px; left: 10px;
width: 100%;
height: 100px;
background: gold;
display: table;
}
<div>
<span></span>
</div>
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment