It is not possible with only CSS.

You will have to definitely go with JavaScript for it.

Create a element whose default style is display:none; and when the nav is collapsed, make the style of that element display: block;