Created
October 19, 2012 23:56
-
-
Save benknight/3921355 to your computer and use it in GitHub Desktop.
Chrome inline-block with floated element page zoom bug
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
/** | |
* Chrome inline-block with floated element page zoom bug | |
* | |
* Problem: Zooming the page causes text to break to next line with black square above at certain zoom levels. | |
* This behavior isn't reproduced in other Webkit browsers, namely Safari. | |
* | |
* Temporary solutions: | |
* 1) Setting white-space: no-wrap on the outer <div> | |
* 2) Using display: inline-block on <i> instead of float: left. | |
*/ | |
div { | |
display: inline-block; | |
border: 1px solid black; | |
font: large sans-serif; | |
} | |
i { | |
display: block; | |
float: left; | |
width: 10px; | |
height: 10px; | |
margin: 5px 5px 0 0; | |
background: black; | |
} | |
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><i></i>Test</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","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment