How to not wrap the contents of a div with CSS?

Spread the love

Sometimes, we want to not wrap the contents of a div with CSS.

In this article, we’ll look at how to not wrap the contents of a div with CSS.

How to not wrap the contents of a div with CSS?

To not wrap the contents of a div with CSS, we use the white-space property.

For instance, we write

white-space: nowrap;

to make the contents of the element stay in 1 row.

Conclusion

To not wrap the contents of a div with CSS, we use the white-space property.

Leave a Reply

Your email address will not be published. Required fields are marked *