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 |
Askew - A Subtle Parallax Banner Plugin | 5,081 Kb |
Manipulating SVG With CSS | 3,640 Kb |
Super Simple Fader | 2,014 Kb |
A Pen by Kyle Foster | 2,404 Kb |
Cattywompus - A Subtle Parallax Banner Plugin | 4,486 Kb |
Ken Burns Banner | 3,817 Kb |
Vanilla Flavored Unorphanize | 5,098 Kb |
Slimslider.js | 3,870 Kb |
SVG Optimization Breakdown | 8,022 Kb |
SVG Circular Scroll Progress Bar | 7,656 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 |
Fullscreen Parallax | Bassta | 3,313 Kb |
Direction-icon | Alexandremasy | 3,323 Kb |
Pruebas de d3.js | Juanmanuelcarnerero | 2,485 Kb |
Speech bubbles | Something | 1,547 Kb |
Button shaking | SusanneLundblad | 2,227 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Cake | Kennyname | 7,220 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
CSS Org Chart | Appirio-ux | 3,882 Kb |
React Markdown Previewer | C0d0er | 3,190 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!