Jump to content

How To Delete Spaces Between Subcategories


Mehe

Recommended Posts

The thing here is that the menu elements are floated to the left and set to 20% width to make them go from left to right in rows. But when one item is higher than another the floating looks like it does now.

 

You could remove the float and set column count for the menu, which would remove the gaps, but the items would be aligned in columns, top to bottom, like this:

 

post-653890-0-44375300-1451307993_thumb.png

Link to comment
Share on other sites

In the css.

.sf-menu > li > ul > li {
    float: left;
    width: 20%;
    padding-right: 15px;
}

Delete the float and width.

.sf-menu > li > ul {
    padding: 26px 30px 31px;
    width: 100%;
    -webkit-column-count: 5;
    -moz-column-count: 5;
    column-count: 5;
}

Add the column count rules.

 

This is not a perfect solution, sometimes an item will start at the bottom and continue in the next column, but test it and see for yourself.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...