문제

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?

도움이 되었습니까?

해결책

Try to add this properties:

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top