Word wrapping in display: table-cell
How do I make an word wrapping in display: table-cell?
The title says it all. If you're using display: table-cell for layout and need proper word wrapping, here's how you get it.. What is a word wrapping in display: table-cell? How do you make a word wrapping in display: table-cell? This script and codes were developed by Kyle Foster on 04 September 2022, Sunday.
Word wrapping in display: table-cell - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Word wrapping in display: table-cell</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ /* ============================ * The important bits * ============================ */
.row { display: table; table-layout: fixed; word-wrap: break-word; width: 100%;
}
.column { display: table-cell;
}
/* ============================ * Just for show * ============================ */
* { margin: 0; padding: 0; box-sizing: border-box;
}
.row { padding: .5em .5em 0 .5em;
}
.row:first-of-type > :last-child,
.row:last-of-type > :first-child { background: maroon;
}
.row:first-of-type > :first-child,
.row:last-of-type > :last-child { width: 30%; background: orange;
}
.column { padding: 1.6em 2em; margin-bottom: 10px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="row"> <div class="column">wordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrap</div> <div class="column">wordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrap</div>
</div>
<div class="row"> <div class="column">wordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrap</div> <div class="column">wordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrapwordwrap</div>
</div>
</body>
</html>
Word wrapping in display: table-cell - Script Codes CSS Codes
/* ============================ * The important bits * ============================ */
.row { display: table; table-layout: fixed; word-wrap: break-word; width: 100%;
}
.column { display: table-cell;
}
/* ============================ * Just for show * ============================ */
* { margin: 0; padding: 0; box-sizing: border-box;
}
.row { padding: .5em .5em 0 .5em;
}
.row:first-of-type > :last-child,
.row:last-of-type > :first-child { background: maroon;
}
.row:first-of-type > :first-child,
.row:last-of-type > :last-child { width: 30%; background: orange;
}
.column { padding: 1.6em 2em; margin-bottom: 10px;
}
Developer | Kyle Foster |
Username | hkfoster |
Uploaded | September 04, 2022 |
Rating | 3 |
Size | 2,105 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Kyle Foster | 2,404 Kb |
SVG Optimization Breakdown | 8,022 Kb |
Messing Around with CSS3 Shadows | 2,202 Kb |
Vanilla Flavored Unorphanize | 5,098 Kb |
Freemason.js | 12,873 Kb |
Rift.js | 3,311 Kb |
Manipulating SVG With CSS | 3,640 Kb |
Ken Burns Banner | 3,817 Kb |
Cattywompus - A Subtle Parallax Banner Plugin | 4,486 Kb |
Slimslider.js | 3,870 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
React Vote Component | Souporserious | 5,465 Kb |
Cool audio | Bigliam | 1,868 Kb |
Table border-collapse property | Maxds | 1,672 Kb |
Stylize Stories | Jvhti | 2,465 Kb |
Voting App - register | MatheusLima92 | 1,948 Kb |
Clock Face Idea | Chrisburnell | 3,196 Kb |
Pink expansion tunnel | Vez | 1,738 Kb |
Css3 slide | Nakome | 3,190 Kb |
About Mazano | Kiti | 2,585 Kb |
Super Discount | Orrinward | 3,225 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!