cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <p><a target="_top" href="http://codepen.io/romanrudenko/pen/ymHFh">Previous Step</a> 09.readmore</p>

<div class="ellipsis"><div>
  <p>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.  Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off &ndash; then, I account it high time to get to sea as soon as I can. <i></i></p>
</div><a href="http://www.gutenberg.org/catalog/world/readfile?fk_files=2579906&amp;pageno=11">Read More</a></div>
            
          
!
            
              html, body, p { margin: 0; padding: 0; font-family: sans-serif;}

.ellipsis {
  overflow: hidden;
  position: relative;
  height: 200px;
	line-height: 25px;
	margin: 20px;
	border: 5px solid #AAA; }

.ellipsis:before {
	content:"";
	float: left;
	width: 5px; height: 200px; }

.ellipsis > *:first-child {
	float: right;
	width: 100%;
	margin-left: -5px; }		

.ellipsis:after {
	content: "\02026 Read More"; 

	box-sizing: content-box;
	-webkit-box-sizing: content-box;
	-moz-box-sizing: content-box;

	float: right; position: relative;
	top: -25px; left: 100%; 
	width: 7em; margin-left: -7em;
	padding-right: 5px;
	
	text-align: right;
  
  background-size: 100% 100%;
  /* 1706x1 image, gradient for IE9. Transparent at 0% -> white at 15% -> white at 100%.*/  
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABqoAAAABCAMAAACRxg/eAAAABGdBTUEAALGPC/xhBQAAAwBQTFRF////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wDWRdwAAAP90Uk5Tfet1sDrNWZIeSRDcocCFLWj1CbhSfuMl1EGoYJkYM8Zui/rwBk15FefYKrxGtKydZQzfIdDJNj1VpFyVcY6BBBwxw2yI/Pfy7RInQ09ie5B0eIMDD+kb5eEk2tbSMMs5QL66tkyyrqpYpl+fm5drAf0H+AoN8+4TFhkf3SIoKwDONDfHO8Q+wURHSlBTVlqiXWNmaZNvcox2iYZ/fAL+9vsFCPkL9A4R8e/sFOjqFxrm5B3i4CDeIybb2SnX1SzT0S/PMsw1yjjIxTzCP79CvbtFuUi3tUuzTrGvUa1Uq6lXp6Vbo16gYZ6cZJpnmJZqlG2RcI9zjYp6d4eChIAu7+D8pQAAASFJREFUOMtjqK+fG2y/UKVwkVDxEsOSZSFcyz3LV6tXrJOtXB/msImjaqtxzfZI8R1etbu16vbx/zsY63hYrvGoWdPxeJaWU+ZtZxIkz3l3XNTpvMzZdS1F9YZP922RnrsWvQ8y2PoeW014miX93HfiK4NJbwQmv89z/qgw9bPNtK8BTDN+Bqr98JvDIDr7r93voD98s365zPyuOP2b7Rf/T+xTPli/y30r8zrnpf6L7Gc8/U8sH2U+lLqffk/vTtot5pup13WvJl8RvpR0Qft84lne9tNOrSflm0+YHos7wtpwyORAzH6JvdF7NHdF7eSu3ma0JWKz2MbwDRprQtcyrvIoW6m8wr10qeB8t6LFSgtcC+b9HwWjYBSMglEw2AEA3ckkQdBniOMAAAAASUVORK5CYII=);


	background: -webkit-gradient(linear, left top, right top,
		from(rgba(255, 255, 255, 0)), to(white), color-stop(15%, white));
	background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 15%, white);			
	background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 15%, white);
	background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 15%, white);
	background: linear-gradient(to right, rgba(255, 255, 255, 0), white 15%, white);  }

.ellipsis a { position: absolute;
	left: 0; top: 0;
	width: 100%; height: 100%;
	overflow: hidden; text-indent: -9999px; }
.ellipsis i, .ellipsis:after {
	font-style: normal; color: blue;}

.ellipsis i:before { content: "Read More";}
            
          
!
            
              // We gild the lily a bit by adding Read More text that appears either as the part of overflowed text or part of the content, but not both. We also overlay all the text with a display: block link. This is better than wrapping content with a link because blocky elements are not reliably contained inside links.
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console