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

Auto Save

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 class="container">
  <p><code>text-overflow: clip</code></p>
  <div class="element element-1">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dicta, velit, aspernatur, facilis excepturi architecto error veritatis possimus explicabo maiores magnam modi numquam reprehenderit necessitatibus suscipit minus voluptatem amet harum ea.
  </div>
  
  <p><code>text-overflow: ellipsis;</code></p>
  <div class="element element-2">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Esse, obcaecati, eaque qui in eligendi nemo fuga beatae itaque repellendus dicta error sed eius? In, iure reprehenderit illum perspiciatis vel sed!
  </div>
  
  <p><code>text-overflow: " >>";</code> (string) (Firefox only)</p>
  <div class="element element-3">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, itaque nihil velit illo ex nostrum facere repudiandae sapiente impedit ipsa vitae ipsam neque error in obcaecati? Dignissimos enim eligendi labore.
  </div>
  
  <p><code>text-overflow: " (Read More...)";</code> (string) (Firefox only)</p>
  <div class="element element-4">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, itaque nihil velit illo ex nostrum facere repudiandae sapiente impedit ipsa vitae ipsam neque error in obcaecati? Dignissimos enim eligendi labore.
  </div>
</div>

  <div class="wrapper" dir="rtl">
    <p><code>text-overflow: clip</code></p>
    <div class="element element-1">
      تعرف على أهم أنواع الطعام التى تقوى جهازك المناعى
    </div>
    
    <p><code>text-overflow: ellipsis;</code></p>
    <div class="element element-2">
      تعرف على أهم أنواع الطعام التى تقوى جهازك المناعى
    </div>

    <p><code>text-overflow: ">>";</code> (string) (Firefox only)</p>
    <div class="element element-3">
      تعرف على أهم أنواع الطعام التى تقوى جهازك المناعى
    </div>
    
    <p><code>text-overflow: " (يتبع)";</code> (string) (Firefox only)</p>
    <div class="element element-4">
      تعرف على أهم أنواع الطعام التى تقوى جهازك المناعى
    </div>
  </div>

              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: #F5F5F5;
  color: #555;
  font-size: 1.1em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  
  width: 100vw;
  min-height: 100vh;
  padding: 2vw;
  
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40%, 1fr));
  gap: 2vw;
}

.element {
  padding: 20px;
  max-width: 400px;
  margin: 10px 0;
  border: 1px solid black;
  background-color: white;
  overflow: hidden;
  white-space: nowrap;
}

.element-1 {
  text-overflow: clip;
}

.element-2 {
  text-overflow: ellipsis;
}

.element-3 {
  text-overflow: ">>";
}

.element-4 {
  text-overflow: "(Read More...)";
}

.wrapper .element {
  max-width: 250px;
}

.wrapper .element-4 {
  text-overflow: "(يتبع)";
}
              
            
!

JS

              
                
              
            
!
999px

Console