css overflow – only 1 line of text October 23, 2022 by Tarik If you want to restrict it to one line, use white-space: nowrap; on the div.