Created
October 11, 2016 12:45
-
-
Save robertknight/cec3453c046705bfc9c8e5b8d2153b56 to your computer and use it in GitHub Desktop.
Using min-width and overflow-wrap to wrap long words in flexbox layouts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<style> | |
.container { | |
display: flex; | |
flex-direction: row; | |
max-width: 100%; | |
} | |
.title { | |
overflow-wrap: break-word; | |
/* | |
min-width must be set explicitly to enable shrinking of `title`. | |
See http://stackoverflow.com/questions/36150458/flex-item-overflows-container-due-to-long-word-even-after-using-word-wrap | |
*/ | |
min-width: 100px; | |
} | |
</style> | |
<div class="container"> | |
<div class="title">Pitt_Comp_Literacy_Culture_Distant_Publics_Development_Rhetoric_and_the_Subject_of_Crisis.pdf,</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment