2

I am adding elements inside a ListView. I want to have control over the size and position of a button in the row. I can freely move the button but can't move it to the top part even though I set the top property to 0.

Also is it possible to make the particular ListView row bigger?

<div data-role="content">
<div id="myCustomCell" >
    <ul id="myCustomGroup" data-role="listview" data-inset="false" >
        <li id="myCustomRow1">
            <a href="#">
                <fieldset data-role="fieldcontain" id="ui-mato"><input type="button" id="ui-mato" name="mato" value="Mato" /></fieldset>
            </a>
        </li>
    </ul>
</div>

The JavaScript modifying the CSS:

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

JSFiddle

6
  • Would the split button list work? jquerymobile.com/demos/1.0rc2/docs/lists/lists-split.html Commented Nov 11, 2011 at 5:19
  • actually what I neede is like this jquerymobile.com/demos/1.0rc2/docs/lists/lists-forms.html. But I need an item at a particular position... for example I like a button placed in x=20 and y=30 and another item at different position inside the List. Commented Nov 11, 2011 at 5:27
  • Playing around, is this something you could use? jsfiddle.net/3Rqwq/16 Commented Nov 11, 2011 at 5:31
  • thank you Phill for this. Its something like that but what i really need is something like for example... I have a row with 300 height. and inside it there is a button placed in x=20 and y=20 with a width and height of 100. and then I want to place another button lets say at x=20 and y =150 with same height.... and so on... Commented Nov 11, 2011 at 5:45
  • thanks Phill... i think i found the solution. i needed to set a div inside a the list and set the position to relative... and put my items inside that div with the absolute positioning. Commented Nov 11, 2011 at 6:55

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.