Web Analytics Made Easy -
StatCounter iScroll not formatting correctly inside <li> - CodingForum

Announcement

Collapse
No announcement yet.

iScroll not formatting correctly inside <li>

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • iScroll not formatting correctly inside <li>

    I have a simple web app. Inside a list item in an unordered list, i need to have two pieces of data. 1. the name of an item, and 2. a set of control elements to add or subtract and display the current quantity of that said item.

    The problem is that when i am using iScroll.js it is offsetting any DIV data within the list item into the next list item down. This is causing a serious problem with my javascript, as i need to grab the ID of a double-clicked list item, and use that elment id as an argument in various other functions.
    I can offset the locations in the list items, but that obviously will cause problems in the javascript, as it would be grabbing the wrong element ID.

    Here is the malfunctioning code
    Code:
    <li id="Item0" ondblclick="Clicked(this);">Elixir of Rage      <div class="ValueDIV"><input type="button" value="+" class="ValueButton" id="AddItem1">  <input type="text" class="ValueText" id="text1"> <input type="button" value="-" class="ValueButton" id="DeleteItem1"></div> </li>

    Attached is the source of this HTML WebApp. Just rename the extention of txt to html, and load it in your browser if you want to see the code live (in Webkit browsers)
    Attached Files

  • #2
    Did i post this question in the wrong forum? So far 26 people viewed this, and nobody replied.
    ...strange.

    Comment


    • #3
      umm...nevermind. It was a CSS problem in my own code, not iScroll.js

      Solution:

      Change
      Code:
      .ValueDIV
      {
       position: relative;
       text-align: right;
       margin-right: 20px;
      }

      to
      Code:
      .ValueDIV
      {
       position: relative;
       float: right;
       margin-right: 20px;
      }

      works perfectly now :]

      Comment

      Working...
      X