Pregunta

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?

¿Fue útil?

Solución

Try to add this properties:

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

Otros consejos

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 bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top