Pergunta

I have bootstrap navbar and i want the links in the top of the list item

        <li>
          <a class="menuLinks" href="http://news.bootswatch.com">Blog</a>
        </li>

CSS:

  .menuLinks {
        vertical-align:top;
  }

I tried this too:

  .menuLinks {
        position:absolute;
        top:0;
  }

and it didn't work too.

How can I do that?

Foi útil?

Solução

Try to add this properties:

display:table-cell;
height:40px;
vertical-align: top;

Outras dicas

Need more information to know what you want to do. If its positioning the element, you can change that in your css with margins etc. Or if you want it above other elements then you need to move the html code above those elements. If you display more of the code it might make it easier to help you.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top