div{ background: skyblue; padding:10px; display: inline-block; } pre{ white-space: pre-wrap; background: #EEE; }