{"id":180050,"date":"2014-08-21T10:58:19","date_gmt":"2014-08-21T17:58:19","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=180050"},"modified":"2022-06-13T08:14:23","modified_gmt":"2022-06-13T15:14:23","slug":"break-inside","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/b\/break-inside\/","title":{"rendered":"break-inside"},"content":{"rendered":"\n

Columns do a great job of flowing and balancing content. Unfortunately, not all elements flow gracefully. Sometimes elements get stuck between columns.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Fortunately, you can tell the browser to keep specific elements together with break-inside<\/code>.<\/p>\n\n\n\n

li {\n-webkit-column-break-inside: avoid;\n          page-break-inside: avoid;\n               break-inside: avoid;\n}<\/code><\/pre>\n\n\n\n

At the moment, the property universally accepts the values auto<\/code> and avoid<\/code>.<\/p>\n\n\n\n

Use avoid<\/code> on an element within a multi-column layout to keep the property from breaking apart.<\/p>\n\n\n\n

Take one extra look at the syntax for this property as there\u2019s some variation among the browsers.<\/p>\n\n\n\n

-webkit-column-break-inside: avoid; \/* Chrome, Safari, Opera *\/\n          page-break-inside: avoid; \/* Firefox *\/\n               break-inside: avoid; \/* IE 10+ *\/<\/code><\/pre>\n\n\n\n

The property takes after the page break<\/a> properties and shares the same values. For now, Firefox uses page-break-inside<\/code><\/a>.<\/p>\n\n\n\n