blob: 60a71ed9075f92f31f40d6280f9091ca27aead3a [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: Line height calculations: the 'line-height' and 'vertical-align' properties - Empty inline elements influence</title>
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height">
<link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="author" title="Bruno Fassino" href="fassino[at]gmail.com">
<meta content="The line-height of an empty inline element influences the height of a line containing it with some other content" name="assert">
<meta content="" name="flags">
<style type="text/css">
#test
{
background-color: lime;
line-height: 1;
}
#empty-inline-element
{
line-height: 5;
}
#reference-overlapped-red
{
background-color: red;
left: 0;
line-height: 5;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
#relatively-positioned-wrapper
{
position: relative;
}
</style>
</head>
<body>
<p>Test passes if there is a wide bright green rectangle below with one "X" in it and if there is no red.</p>
<div id="relatively-positioned-wrapper">
<div id="test"><span id="empty-inline-element"></span>X</div>
<div id="reference-overlapped-red">X</div>
</body>
</html>