<div style="display:inline-block; white-space: nowrap;"> | |
<div style="display:inline-block; white-space: normal; background-color: yellow">This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport. This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport. | |
</div> | |
<img src="foobar" style="width: 500px; height: 20px; background-color: green;"> | |
</div> |