Word wrapping in display: table-cell

Developer
Size
2,105 Kb
Views
26,312

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 Previews

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;
}
Word wrapping in display: table-cell - Script Codes
Word wrapping in display: table-cell - Script Codes
Home Page Home
Developer Kyle Foster
Username hkfoster
Uploaded September 04, 2022
Rating 3
Size 2,105 Kb
Views 26,312
Do you need developer help for Word wrapping in display: table-cell?

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!

Kyle Foster (hkfoster) Script Codes
Create amazing video scripts with AI!

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!