List-style disappearing when using 'Columns'

Asked

Viewed 74 times

3

I am using'Columns' in ul to split my menu into 2 columns. More when using, list-style some. Why? There is a possibility that it will not disappear?

<ul id="menu-footer">
  <li><a href="index.php">home</a></li>
  <li><a href="empresa.php">empresa</a></li>
  <li><a href="servicos.php">servicos</a></li>
  <li><a href="produtos.php">produtos</a></li>
  <li><a href="contatos.php">contatos</a></li>
</ul>

footer #menu-footer { -webkit-column-count: 2; -moz-column-count: 2; -o-column-count: 2; -ms-column-count: 2; column-count: 2; list-style-position: inside;}
footer #menu-footer li {list-style: square; color: #fff;}
  • I edited the answer based on your codes.

1 answer

5

You need to add list-style-position, to specify that markers should appear within the content stream:

.menu{
   -webkit-column-count: 2;
   -moz-column-count: 2;
   column-count: 2;
   list-style-position: inside;
}

Example: Jsfiddle

Edited

You have some problems with your CSS selectors, change in your code footer #menu-footer for footer > #menu-footer and footer #menu-footer li for footer > #menu-footer.li. For greater understanding selectors

footer > #menu-footer { 
    -webkit-column-count: 2; 
    -moz-column-count: 2; 
    -o-column-count: 2; 
    -ms-column-count: 2; 
    column-count: 2; 
    list-style-position: inside;
}
footer > #menu-footer.li {
list-style: square; color: #fff;
}

Exemplo2: Jsfiddle

  • I tried to play in my code and it didn’t work :(

  • Post your code to verify

  • It hasn’t worked yet. There must be something else interfering.

  • @So you must have some other property conflicting in your CSS, try to put list-style-position: inside !important;.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.