简体   繁体   中英

Height of Toolbar of jQuery Mobile

the height of the toolbar in my project is somehow not right. I tried many possibilities, went back to an index.html which had nothing but the toolbar. And even then it has this wrong height:

截图

The height should be the same like button - but it is not. There is nothing changed on css or js of jQuery mobile, just downloaded and imported.

Any Idea why it looks this way? It is not dynamic, seems like it is a hardcoded height. Changing the height of the toolbar in CSS leads to a wrong positioning of the text.

Ok, jQuery UI is actually generating some &nbsp in the header. That's why you have all this "extra" space.

As explained here , you have to remove the spaces between the tags and all will be displayed correctly.

https://jsfiddle.net/k4502jLq/1/

Also, if you are using Sublime Text , you should have a look on Trailing Spaces , which remove all this kind of "non-desired" spaces automatically when you save you file. Very useful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM