Agyan
adda
Run
Reset
Copy
CSS Tutorial › CSS Overflow › Overflow values
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<style> .box { width: 200px; height: 70px; border: 1px solid #333; margin-bottom: 12px; } .hidden { overflow: hidden; } .auto { overflow: auto; } .ellipsis { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } </style> <div class="box hidden">overflow: hidden cuts this long text so that you cannot see the rest of it at all.</div> <div class="box auto">overflow: auto adds a scrollbar when the text is longer than the box can hold.</div> <p class="ellipsis">This very long single line of text ends with three dots</p>
Result