startv

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

            
              <article class="entry A">
  <header>
    <h1>A</h1>
  </header>
  <div class="entry-content">
    <p class="intro">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>

    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </div>
</article>

<hr>

<article class="entry B">
  <header>
    <h1>B</h1>
  </header>
   <p class="intro">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>

   <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</article>

<hr>

<article class="entry C">
  <header>
    <h1>C</h1>
  </header>
  <button>button A</button>
  <button>button B</button>
  <button disabled>button C</button>
</article>

<hr>

<article class="entry D">
  <header>
    <h1>D</h1>
  </header>
  <a href="http://css-tricks.com">Link1</a>
  <a href="http://css-tricks.com">Link2</a>
  <a href="http://google.com">Link3</a>
  <a href="http://google.com">Link4</a>
</article>

<hr>

<article class="entry E">
  <header>
    <h1>E</h1>
  </header>
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
</article>

<hr>

<article class="entry F">
  <header>
    <h1>F</h1>
  </header>
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
  <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</article>
            
          
!

CSS

            
              /**
*
* Global Styles
*
*/

a {
  color: #4186db;
}

html {
  background: #303031;
  color: #e78629;
}

h1,h2,h3,h4,h5,h6 {
  //color: #FFF;
}

.entry {
  width: 42em;
  margin: 0 auto;
}


/**
*
* Demo A
* Class Selector on Nested Element
*/
.entry.A .entry-content :not(.intro) {
  color: #31cdf7;
}


/**
*
* Demo B
* Class Selector w/out Nesting
*
*/
.entry.B :not(.intro) {
  font-size: 14px;
}


/**
*
* Demo C
* This demo uses the attribute as our simple selector
* http://www.w3.org/TR/selectors/#simple-selectors-dfn
*
*/
.entry.C button:not([disabled]) {
  font-size: 20px;
}


/**
*
* Demo D
* Attribute Selector
*
*/
.entry.D a:not([href*="http://css-tricks"]) {
  color: #FFF;
  text-decoration: none;
}


/**
*
* Demo E
* won't work because ::first-line is a pseudo element
*
*/
.entry.E p:not(::first-line) {
  color: white;
}


/**
*
* Demo F
* nth-child Pseudo Class
*
*/
.entry.F p:not(:nth-child(2n+1)) {
  border: 1px solid orange;
  color: white;
}
            
          
!

JS

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

Console