Created
April 16, 2012 01:30
-
-
Save LeaVerou/2395875 to your computer and use it in GitHub Desktop.
WebKit bug with display:table + position:absolute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<span></span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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