Current location - Recipe Complete Network - Complete cookbook of home-style dishes - My secondary menu is too long. How to realize word wrap with CSS? Do you have a chart?
My secondary menu is too long. How to realize word wrap with CSS? Do you have a chart?
Set the width of the dropmenu to the size of two menu items, such as 240px.

Then set the width of Li to 120 overflow: hide overflow and hide floating: float to the left.

This way, it will automatically pull down into two rows of drop-down menus, and so on. You can get three columns, four columns and five columns.

If overflow is not set, pay attention to control the menu name and project length.