I've been working on converting an element. The font-size conversion seems to be successful, but the margin conversion is not working as expected.
Here is my code attempt:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.box{
font-size:30px;
margin:23px 0;
font-weight:bold;
}
</style>
</head>
<body>
</head>
<body>
<div class="box">Some text here</div>
</body>
</html>
When comparing it to this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body{
font-size:20px;
}
</style>
</head>
<body>
</head>
<body>
<h2>Some text here</h2>
</body>
</html>
It appears that both the H2 and .box elements have the same font-size in the browser.
This is incorrect, it should actually be 24px. Can you help me identify where I might have gone wrong?