cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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.

            
              <div class="wrap">
  <h1>Background Color on Columns </h1>

	<div class="container1">
		<div class="column1">
    	<h2>Column 1</h2>
      <p>Column 1 is longer than the 2nd column, and the columns are different heights.</p>
      <p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.</p>
    </div>
    <div class="column2">
    	<h2>Column 2</h2>
      <p>This is column 2. It is much shorter than column 1</p>
    </div>
    
  </div><!-- container1 --> 
</div><!-- wrap -->
<div class="wrap">
	<h1>Background Gradient on Container</h1>
  
	<div class="container2">
		<div class="column1">
    	<h2>Column 1</h2>
      <p>Because the background of the container has the gradient, the columns appear to be the same height.</p>
      <p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.</p>
    </div>
    <div class="column2">
    	<h2>Column 2</h2>
      <p>This is column 2. It is much shorter than column 1</p>
    </div>
    
  </div><!-- container2 -->  
</div><!-- wrap -->
            
          
!
            
              /* Set up */
* { box-sizing: border-box; }
body { 
  font-family: 'Open Sans', serif;
  line-height: 1.5;
}
h1 { 
  font-size: 1.3em;
}
.wrap {
  width: 47%;
  margin: 1.5%;
  float: left;
}
.container1, .container2 { 
  width: 100%; 
  overflow: auto;
}

.column1, .column2 {
  padding: 3%;
  float: left;
}

/* Example 1: color on columns */
.column1 {
  background-color: #a2ea4c;
  width: 60%;
}
.column2 {
  background-color: #07aa91;
  width: 40%;
}

/* Example 2: color on container, as a gradient */

/* This is only to reset column colors that I set in first example. 
   You would not need this in your code, if only using example 2 
*/
.container2 .column1,
.container2 .column2 {
  background-color: transparent;
}

/* Gradient for container */
.container2 {
  background: #a2ea4c;  
  background-image: -webkit-linear-gradient(left, #a2ea4c 60%, #07aa91 60%, #07aa91 100%);
  background-image: linear-gradient(left, #a2ea4c 60%, #07aa91 60%, #07aa91 100%);
}



            
          
!
999px
Loading ..................

Console