Kaidul
Kaidul

Reputation: 15875

Jquery Mobile - how to change the height of listview

To change the height of listView I have used this :

.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li {
             padding-top:10px;
             padding-bottom:10px;
}

This make every listView height changed.Okay, everything is fine.But it also change the height of the pop-up option list value of select field.Height becomes tinny

I can add internal CSS to fix it but this needs a lot of page to be proccessed.Now I want to know Is there any way to write better non-overriding CSS for both listview and select menu?

Upvotes: 0

Views: 1786

Answers (1)

Franz Noel
Franz Noel

Reputation: 1880

In order to change the height of the listview while not overriding it:

  • You should find the source of the class that is causing it.
  • Remove the class with jquery
  • replace it with your own class

To replace class

$("p").removeClass(".ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li ").addClass(".whatever .your .class .is");

You have to be detailed and specific.

Upvotes: 1

Related Questions