سؤال

How can I align text in Bootstrap nav... I have this html code:

<ul class="nav nav-justified">

    <li><a href="#">PREVIOUS</a></li>
    <li><a href="#" onclick = "myFunction();">PLAY</a></li>
    <li><a href="#" onclick = "stop();">PAUSE</a></li>
    <li><a href="#">NEXT</a></li>

</ul>

This PREVIOUS, PLAY, PAUSE and NEXT text needs to be aligned top.

هل كانت مفيدة؟

المحلول

just use custom styles, by default .nav has a padding, so if you reset the top padding to 0 it'll be aligned as you want.... try this

.nav > li > a {
   padding-top: 0;
}

EDIT make sure you use it AFTER you include bootstrap.css in your project

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top