<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
 margin: 0;
}
#block {
 background-color: green;
 margin: 10px 0;
}
#inline-block {
 display: inline-block;
 margin: 10px 0;
 background-color: lightgreen;
}
</style>
</head>
<body>
<div id="block"><div id="inline-block">Hello Kitty</div></div>
</body>
</html>