Figuring out zero height without floats

by mark69_fnd

HTML

<html>
<body>
<div>
  I am a content, can you see the subcontent below to the right?
  <div class="line">
    <div class="char stickToRight">
      <div>I am a subcontent</div>
    </div>
  </div>
</div>
<hr/>
</body>
</html>

CSS

html, body {
    height: 100%;
}

.char {
    display: inline-block;
}

.line {
    overflow: hidden;
    position: relative;
}

.stickToRight {
    position: absolute;
    right: 0;
}