CSS word-wrapping in div

As Andrew said, your text should be doing just that. There is one instance that I can think of that will behave in the manner you suggest, and that is if you have the whitespace property set. See if you don’t have the following in your CSS somewhere: white-space: nowrap That will cause text to … Read more

First-child full-width in Flexbox

You can set the :first-child to a width of 100%, and the rest of the childs :not(:first-child) to flex: 1. To put them on multiple lines, use flex-wrap: wrap on the container: .container { display: flex; justify-content: space-between; flex-wrap: wrap; background: #e2eaf4; padding: 10px; } .child { display: inline-block; font-family: “Open Sans”, Arial; font-size: 20px; … Read more

How to specify table’s height such that a vertical scroll bar appears?

Try using the overflow CSS property. There are also separate properties to define the behaviour of just horizontal overflow (overflow-x) and vertical overflow (overflow-y). Since you only want the vertical scroll, try this: table { height: 500px; overflow-y: scroll; } EDIT: Apparently <table> elements don’t respect the overflow property. This appears to be because <table> … Read more

Print styles: How to ensure image doesn’t span a page break

The only means I can think of is to use one (or potentially more) of the following css rules: img { page-break-before: auto; /* ‘always,’ ‘avoid,’ ‘left,’ ‘inherit,’ or ‘right’ */ page-break-after: auto; /* ‘always,’ ‘avoid,’ ‘left,’ ‘inherit,’ or ‘right’ */ page-break-inside: avoid; /* or ‘auto’ */ } I half-recall that these declarations only apply … Read more