Skip to content

Instantly share code, notes, and snippets.

@koreapyj
Created December 31, 2017 11:02
Show Gist options
  • Save koreapyj/ff7ac9cab4d9d2e7abb80a3f3306c77e to your computer and use it in GitHub Desktop.
Save koreapyj/ff7ac9cab4d9d2e7abb80a3f3306c77e to your computer and use it in GitHub Desktop.
파폭이랑 웹킷친구들의 동작이 다른 점에 대하여
<html>
<head>
<style>
div {
display: inline-block;
border: 1px solid black;
height: 40px;
vertical-align: top;
text-decoration: underline;
}
div:nth-of-type(1) {
line-height: 40px;
}
div:nth-of-type(2):before {
content: '';
display: inline-block;
vertical-align: middle;
height: 100%;
}
</style>
</head>
<body>
<div>line-height: 100%</div>
<div>before vertical-align</div>
</body>
</html>
@saschanaz
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment