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 id="main" class="container-fluid">
  <div class="page-header">
    <h1>Definition List <small>iOS Inspired Definition List</small></h1>
    <p>Loosely inspired by the look of a grouped table view in iOS, this aims to render basic html definition lists in a similar manner. <a href="https://codepen.io/somethingkindawierd/pen/gEnwo">Here is another version powered by MarionetteJS</a></p>
  </div>
  
  <div class="row-fluid">
    <div class="span12">
      <div class="main ios-dl">
        
        <span class="legend">Location Info</span>
        <div class="definition-group">
          <dl class="dl-horizontal">
            <dt>City</dt>
            <dd>San Francisco</dd>
          </dl>
          <dl class="dl-horizontal">
            <dt>State</dt>
            <dd>Insanity</dd>
          </dl>
          <dl class="dl-horizontal">
            <dt>Coordinates</dt>
            <dd>37.7865, -122.4557</dd>
          </dl>
        </div>
        
        <span class="legend">Personal Info</span>
        <div class="definition-group">
          <dl class="dl-horizontal">
            <dt>Hobbies</dt>
            <dd>Photography, Reading</dd>
          </dl>
          <dl class="dl-horizontal">
            <dt>Favorite Animal</dt>
            <dd>Monkey (with a banana)</dd>
          </dl>
        </div>
        
      </div>
    </div>
  </div>
</div>
            
          
!
            
              @iosbg: #dadee6;
@borderColor: #b0b4bc;

.striped-bg (@color1, @color2, @size: 10px) {
  background: -webkit-linear-gradient(left, @color1 50%, @color2 50%);
  background: -moz-linear-gradient(left, @color1 50%, @color2 50%);
  background: linear-gradient(left, @color1 50%, @color2 50%);
  background-size: @size @size;
}

html, body {
  .striped-bg(lighten(@iosbg, 2%), lighten(@iosbg, 3%));
}

#main {
  margin-bottom: 2em;
}

.page-header {
   border-bottom-color: @borderColor;
}

.ios-dl {
  
  .legend {
    display: block;
    padding: 0;
    margin: 20px 0px 0px;
    font-size: 21px;
    line-height: 40px;
    color: #8B91A5;
    font-weight: bold;
  }
  
  .definition-group {
    background: #fff;
    border-radius: 10px;
    border: 1px solid @borderColor;
    box-shadow: 0 1px 1px 0 white, 0 1px 1px 0 lighten(@borderColor, 15%) inset;
  }
  
  dl {
    padding: 1em;
    margin: 0px;
    background: transparent;
    border-top: 1px solid lighten(@borderColor, 15%);
  }
  
  dl:first-child {
    border: none;
  }
  
  dt {
    color: rgb(139, 145, 165);
    font-weight: bold;
  }
  
  dd {
    color: #555;
  }
  
}
            
          
!
999px
Loading ..................

Console