CodePen

HTML

            
              <p><a target="_top" href="http://codepen.io/romanrudenko/pen/wvxbd">Previous Step</a> 02.switchback <a target="_top" href="http://codepen.io/romanrudenko/pen/sKnmz">Next Step</a></p>

<div class="wrap">
  <div class="prop">1.prop<br>float:right</div>
  <div class="main">2.main<br>float:left<br>Fairly short text</div>
  <div class="end"><div class="realend">4.realend<br>position:absolute</div>3.end<br>float:right</div>
</div>

<div class="wrap">
	<div class="prop">1.prop<br>float:right</div>
	<div class="main">2.main<br>float:left<br>Call me Ishmael.  Some years ago &ndash; never mind how long precisely &ndash; having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.  It is a way I have of driving off the spleen, and regulating the circulation.</div>
	<div class="end"><div class="realend">4.realend<br>position:absolute</div>3.end<br>float:right</div>
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              html, body { margin: 0; padding: 0; font-family: sans-serif;}

.prop, .main, .end {
  opacity: 0.7;
}
.wrap {
	width: 400px; height: 200px;
	margin: 20px 20px 50px;
	border: 5px solid #AAA;
	line-height: 25px; 
}

.prop {
	float: left;
	width: 100px; height: 200px; 
	background: #FAF; }
.main {
	float: right;
	width: 300px; 
	background: #AFF; }
.end {
	float: right; position: relative;
	width: 100px;
	background: #FFA; }
.realend {
	position: absolute;
	width: 100%;
	top: -50px;
	left: 300px;
	background: #FAA; font-size: 13px; }
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              // Now, let's flip the scenario and make this work properly - show the ellipsis element when the content is too long for the container. For demonstration reasons, we will create a new "realend" element within "end". The location of "realend" is defined relative to that of "end", so that when "end" is trapped in the corner, "realend" lands on the bottom right, and when "end" is free, "realend" is out of bounds.

// This is beginning to look like a proper text-overflow implementation, but all its plumbing is exposed and widths are fixed. 
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................