Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="container">
  <nav role='navigation'>
    <h1>Justified!</h1>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Projects</a></li>
      <li><a href="#">Clients</a></li>
      <li><a href="#">Contact Us</a></li>
    </ul>
  </nav>
  <article>
    <p>A simple navigation that uses text-align:justify on display:inline-block li elements. No floats. I was inspired to try it out after checking out an article in Smashing Magazine - a link to which I cannot find right now!</p>
    <p>Also be sure to check out this excellent article on the topic from <a href="http://www.barrelny.com/blog/text-align-justify-and-rwd/" target="_blank">Barrel NY</a>.</p>
    <p><a href="http://agustinsevilla.com/using-text-align-justify-for-layout/">I did a writeup on it</a> that has more links on it!  Be sure to check out the comments here too - great stuff there, too!</p>
    <img src="http://placekitten.com/700" alt="" />
  </article>
</div>
              
            
!

CSS

              
                @import compass

$break-small: 720px
$break-large: 1200px
$bgcolor: #046380
$contcolor: #EFECCA
$textcolor: #002F2F
$strokecolor: #A7A37E

@import url(https://fonts.googleapis.com/css?family=Kavoon)
@import url(https://fonts.googleapis.com/css?family=Open+Sans)

body 
  background :
    color : $bgcolor
      
#container 
  padding: 2.5em
  width: 40em
  margin: 0px auto
  background: 
    color: $contcolor
  border-radius: 0.5em
  nav
    font : 
      family: 'Kavoon', cursive
    h1
      text:
        align: center
      font:
        size: 4em
      color: $textcolor
    ul
      margin: 0
      padding:
        top: 16px
        bottom: 16px
        left: 0
        right: 0
      text-align: justify
      width: 100%
      border:
        top: 1px solid $strokecolor
        bottom: 1px solid $strokecolor
      font:
        size: 0.1px
        
      li
        display: inline-block
        margin: 0
        padding: 0
        vertical-align: top
        font:
          size: 16px
          
        a
          display: block
          color: $textcolor
          text-decoration: none
          font :
            size: 1.5em
        
            
      &:after
        display: inline-block
        content: ""
        width: 100%
        height: 0

  article
    p
      font:
        family : "Open Sans", sans-serif
    img 
      width: 100%
      height: auto
      

@media screen and (max-width: $break-small)
  #container
    width: 100%
    padding: 0
    nav
      padding: 
        top: 0.1em
        left: 1em
        bottom: 0
        right: 1em
      ul
        li
          a
            font-size: 1em
    article
      padding: 1em

              
            
!

JS

              
                
              
            
!
999px

Console