Domanda

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?

È stato utile?

Soluzione

Try to add this properties:

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

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top