Chinchan Zu
Chinchan Zu

Reputation: 918

JQueryMobile: Adding Button inside a ListView

I am adding some elements inside a ListView, I know it is possible in the current one but what I do really need is I want to have control over the size and position of a button in the row.

currently i have this JFiddle code.

js code

$("#ui-mato").css({
    'position':'relative',
    'left':'70.0px',
    'top':'0px',
    'width':'150.0px',
    'height':'38.0px',
    'line-height':'38.0px'
});

The problem is though I can freely move the button I cant move it to the top part though I set the top property to 0, it doesnt work. Also Is it possible to make the particular ListView row bigger?

If anyone can help me please. see my JFiddle. Thanks a lot!

UPDATE:

I found a way to make it stick to the ceiling of the row by assigning negative value like -20. but I dont understand why it has to be negative. And one more thing, do anyone know how to adjust the height of a row?

UPDATE 2

I think I fould the solution. Thanks Phill for some ideas here it is JFiddle

Upvotes: 2

Views: 6968

Answers (2)

Mavlarn
Mavlarn

Reputation: 3883

I think you can use grid in li, you can control the position by percentage of grid.

Upvotes: 1

Chinchan Zu
Chinchan Zu

Reputation: 918

This is the solution I made. JFiddle

Upvotes: 0

Related Questions