Mistergreen Mistergreen - 1 year ago 74
CSS Question

JQM navbar last button not align

This is a peculiar thing. The last button is always mis-aligned vertically.


<div data-role="navbar">    
<li><a href="#one" data-ajax="false">one</a>
<li><a href="#two" data-ajax="false">two</a>
<li><a href="#three" data-ajax="false">three</a>

The code is straight forward from the jqm website. I've checked the css properties and it looks fine.

Answer Source

Can you just try this http://jsfiddle.net/5u38gf00/1/

I just change the onLoad event to onDomReady event, then it seems work fine

This will be the simple test code to display desired output in .html page. (Tested local)

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
    <div data-role="navbar">
        <li><a href="#">Home</a></li>
        <li><a href="#">Page Two</a></li>
        <li><a href="#">Search</a></li>

OutPut:- enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download