octocatstartv

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
via CSS Lint

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
via JS Hint

Code Indentation

     

Save Automatically?

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

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <div class="parent">
    <div class="row">
      <div class="col1">1</div>
      <div class="col2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</div>
      <div class="col3"><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/></div>
    </div>
    <div class="row">
      <div class="col1">2</div>
      <div class="col2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</div>
      <div class="col3"><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/></div>
    </div>
    <div class="row">
      <div class="col1">3</div>
      <div class="col2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.
        <br>
        <br>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</div>
      <div class="col3"><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/><input type="radio"/></div>
    </div>
</div>
            
          
!

CSS

            
              * {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.parent { 
  min-width: 310px; 
  width: 80%; 
  margin: 0 auto;
  border: 1px solid black;
  border-radius: 10px;
  padding: 10px;
  display:table; /* the trick */
  border-collapse: separate;
  border-spacing:5px;
}
.row { 
  width: 100%;
  display:table-row; /* the trick */
}
.col1, .col2, .col3 
{ 
  vertical-align: top;
  border: 1px solid black;
  background: #ccc;
  padding: 5px;
  display:table-cell;  /* the trick */
  letter-spacing:normal;
}
.col1 {
  width: 10%;
}
.col2 {
  width: 72%;
}
.col3 {
  width: 18%;
}

            
          
!

JS

            
              /*
the solution without javascript
to use this with Internet Explorer 8 and 9 
just insert into the HEAD section of your html 
the following line : 

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

and it will work well 

for Internet Explorer 8 and 7,
please check this link : 
http://tanalin.com/en/projects/display-table-htc/

HAPPY CSS-ing !! ;) 

*/
            
          
!
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