Just change the display box type to inline:
p {
display: inline;
}
body {
width: 170px;
}
p {
display: inline;
background: black;
color: white;
}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
And if there is space between each line, then set font-size equal to line-height, or v.v.