

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Breaking Overflow Text using CSS3
To break overflow text, use the word-wrap property and set it to the value “break-word”. Following is the code displaying how to break overflow text using CSS3 −
Example
<!DOCTYPE html> <html> <head> <style> div { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; border: 3px solid #3008c0; } div.one { width: 200px; word-wrap: normal; } div.two { width: 200px; word-wrap: break-word; } </style> </head> <body> <h1>Div1</h1> <div class="one"> Lorem ipsum dolor sitametconsecteturadipisicjhbjhgjingelit. Rerum, beatae. </div> <h1>Div2</h1> <div class="two"> Lorem ipsum dolor sitametconsecteturadipisicjhbjhgjingelit. Rerum, beatae. </div> </body> </html>
Output
The above code will produce the following output −
- Related Questions & Answers
- Handling Text Overflow in CSS3
- Specify Word Breaking Rules using CSS3
- Text in Transparent Box using CSS3
- CSS text-overflow property
- How to limit input text length using CSS3?
- Heap overflow and Stack overflow
- How to create CSS3 Box and Text Shadow Effects?
- Heap overflow and Stack overflow in C
- Setting Column Gap using CSS3
- Performing multiple transitions using CSS3
- Electric Breaking of DC Motors – Types of Electric Breaking
- Adjusting the Image Contrast using CSS3
- Setting the Image Brightness using CSS3
- Applying Opacity to Images using CSS3
- Reordering Individual Flex Items using CSS3
Advertisements