css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <body style="background-color: #EEEEEE">
<section class="cards">

    <div class="card">
      <div class="top-section">
        <h3>Main Heading</h3>
        <a class="title" href="#">Heading Caption</a>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
      <div class="likes-bar">
        <p>Average Rating: <a href="#">5 </a></p>
      </div>
      <div class="action-bar">
        <ul>
          <li class="comments">
            <a href="#"><i class="ion ion-ios-chatbubble"></i> <span class="comments-link">24 Comments</span></a>
          </li>
          <li class="share">
            <a href="#"><i class="ion ion-thumbsup"></i><span>73</span></a>
          </li>
          <li class="like">
            <a href="#"><i class="ion ion-thumbsdown"></i><span>13</span></a>
          </li>
        </ul>
      </div>
    </div>

    <div class="card">
      <div class="top-section">
        <h3>Main Heading</h3>
        <a class="title" href="#">Heading Caption</a>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
      <div class="likes-bar">
        <p>Average Rating: <a href="#">5 </a></p>
      </div>
      <div class="action-bar">
        <ul>
          <li class="comments">
            <a href="#"><i class="ion ion-ios-chatbubble"></i> <span class="comments-link">24 Comments</span></a>
          </li>
          <li class="share">
            <a href="#"><i class="ion ion-thumbsup"></i><span>73</span></a>
          </li>
          <li class="like">
            <a href="#"><i class="ion ion-thumbsdown"></i><span>13</span></a>
          </li>
        </ul>
      </div>
    </div>

    <div class="card">
      <div class="top-section">
        <h3>Main Heading</h3>
        <a class="title" href="#">Heading Caption</a>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
      <div class="likes-bar">
        <p>Average Rating: <a href="#">5 </a></p>
      </div>
      <div class="action-bar">
        <ul>
          <li class="comments">
            <a href="#"><i class="ion ion-ios-chatbubble"></i> <span class="comments-link">24 Comments</span></a>
          </li>
          <li class="share">
            <a href="#"><i class="ion ion-thumbsup"></i><span>73</span></a>
          </li>
          <li class="like">
            <a href="#"><i class="ion ion-thumbsdown"></i><span>13</span></a>
          </li>
        </ul>
      </div>
    </div>

    </section>
</body>
            
          
!
            
              $card-width: 75%
$card-bg: #fff
$name: "Maven Pro"
$department: "Roboto Slab"
$text: "Roboto"
$other-font: "Montserrat"


@mixin box-direction($boxDirection)
  -webkit-box-direction: $boxDirection
  -moz-box-direction: $boxDirection
  -ms-box-direction: $boxDirection
  box-direction: $boxDirection

@mixin flex-direction($flexDirection)
  -webkit-flex-direction: $flexDirection
  -moz-flex-direction: $flexDirection
  -ms-flex-direction: $flexDirection
  flex-direction: $flexDirection

@mixin box-orient($boxOrient) 
  -webkit-box-orient: $boxOrient
  -moz-box-orient: $boxOrient
  -ms-box-orient: $boxOrient
  box-orient: $boxOrient
	
@mixin box-pack($boxPack) 
  -webkit-box-pack: $boxPack
  -moz-box-pack: $boxPack
  -ms-box-pack: $boxPack
  box-pack: $boxPack

html
  box-sizing: border-box

*, :before, :after
  box-sizing: inherit

.cards
  position: relative
  top: 2.5em
  display: flex
  -ms-flex-wrap: wrap
  flex-wrap: wrap
	
  @include box-orient(vertical)
  @include box-direction(normal)
  @include flex-direction(column)

@media (min-width: 37.5em)
  .cards
    @include box-orient(horizontal)
    @include box-direction(normal)
    @include flex-direction(row)
    @include box-pack(justify)

    -ms-flex-pack: justify
    justify-content: center


.card
  width: 100%
  margin: 0.75em
  background: $card-bg
  position: relative
  overflow: hidden
  box-shadow: 2px 3px 4px #757575

  .top-section
    padding: 1.5em
    p:last-of-type
      margin-bottom: 0
  h3
    margin: 0
    padding-bottom: 0.3em
    font-size: 1.75em
    font-family: $name
    a
      color: #000
      &:hover
        color: #000
  .title
    line-height: 1.5
    font-size: 1.2em
    display: block
    font-family: $department
  p
    margin-top: 0.75em
    font-size: 1.2em
    color: #424242
    line-height: 1.5
    font-family: $text
    text-align: justify
  a
    color: #f44242
    text-decoration: none
    &:hover, &:focus
      color: darken(#f44242, 15%)
      text-decoration: none
      transition: all 0.3s
  .likes-bar
    border: solid 1px black
    padding: 0 1.5em
    border-width: 1px 0 1px 0
    font-size: 90%
    p
      color: black
      letter-spacing: 2px
      a:first-of-type
        color: #333
        font-weight: bold
  .action-bar
    ul
      margin: 0
      padding: 0
      width: 100%
      position: relative
      overflow: hidden
    li
      list-style: none
      float: left
      text-align: center
      font-size: 1.1em
      a
        display: block
        padding: 1em 0
        color: #616161
        &:hover, &:focus
          color: #000
          text-decoration: none
      &.comments
        width: 50%
        text-align: left
        padding: 0 1.5em
        border: solid black
        border-width: 0 0 0 0
        
        .comments-link
          font-family: $other-font
          font-size: 0.8em
          font-weight: bold
      &.share, &.like
        width: 25%
      &.share
        border: solid black
        border-width: 0 1px 0 1px
    span:not(.comments-link)
      font-family: $other-font
      font-size: 0.8em
      height: 1px
      width: 1px
      padding: 0.3em
      border: 0

@media (min-width: 37.5em)
  .card
    width: $card-width

@media (min-width: 70.5em)
  .card
    width: $card-width

@media(max-width: 1024px)
  .cards
    justify-content: center
  .card
    width: 98%

@media(max-width: 414px)
  .cards
    justify-content: center
  .card
    width: 94%

@media(max-width: 414px)
  .cards
    justify-content: center

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console