- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Handling Text Overflow in CSS3
The text-overflow property is used in CSS3 to determine how overflowed content that is not displayed is signaled to users
Following is the code for handling text overflow in CSS3 −
Example
<!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } div { white-space: nowrap; width: 100px; overflow: hidden; border: 1px solid #3008c0; margin: 10px; padding: 10px; } .clip { text-overflow: clip; } .ellipsis { text-overflow: ellipsis; } </style> </head> <body> <h1>Handling text overflow example</h1> CLIP: <div class="clip"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum, beatae. </div> ELLIPSES: <div class="ellipsis"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum, beatae. </div> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- Breaking Overflow Text using CSS3
- Overflow Handling in Data Structure
- CSS text-overflow property
- What is the use of NO_UNSIGNED_SUBTRACT SQL mode in handling overflow?
- Text in Transparent Box using CSS3
- How to limit input text length using CSS3?
- How to create CSS3 Box and Text Shadow Effects?
- Heap overflow and Stack overflow in C
- Heap overflow and Stack overflow
- Overflow of DataTypes in Java
- CSS overflow: visible
- CSS overflow: hidden
- CSS overflow: scroll
- CSS overflow: auto
- CSS overflow-y

Advertisements