Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:59:58+00:00 2026-06-10T19:59:58+00:00

I am dynamically loading data from mysql server into a list whose itemTpl is

  • 0

I am dynamically loading data from mysql server into a list whose itemTpl is defined as below:

itemTpl: "<div class=\"list-item-title\">{item_name}{item_qty}</div><div class=\"list-    item-narrative\">{item_detail}</div>

I have my app.css defined accordingly shown below. I want my “item_name” to the leftmost side of my list and item_qty to be on the rightmost side in the same line. I can use a number of spaces (&nbsp), but I want some relative spacing between the two items.

When I am using 2 different div elements for {item_name} and {item_qty}, they appear in 2 different lines and not in the same in the list.

itemTpl: "<div class=\"list-item-title\">{item_name}</div><div class=\"list-item-qty\">{item_qty}</div><div class=\"list-item-narrative\">{item_detail}</div>

app.css

/* Increase height of list item so title and narrative lines fit */
.x-list .x-list-item .x-list-item-label
{
 min-height: 3.5em!important;
}
/* Move up the disclosure button to account for the list item height increase */
.x-list .x-list-disclosure {
position: absolute;
bottom: 0.85em;
right: 0.44em;
}
.list-item-title
{
    float:left;
    width:100%;
    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
    line-height:150%;
margin-right:520px;
}
.list-item-narrative
{
    float:left;
    width:95%;

    font-size:90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right:25px;
}
.x-item-selected .list-item-title
{
    color:#ffffff;
}
.x-item-selected .list-item-narrative
{
    color:#ffffff;
}
.notes-list-empty-text
{
    padding:10px;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:59:59+00:00Added an answer on June 10, 2026 at 7:59 pm

    Your itemTpl looks like:

    itemTpl: "<div class=\"list-item-title\">{item_name}</div><div class=\"list-item-qty\">{item_qty}</div><div class=\"list-item-narrative\">{item_detail}</div>
    

    But your app.css is wrong. One class is missing: list-item-qty

    try this one:

    /* Increase height of list item so title and narrative lines fit */
    .x-list .x-list-item .x-list-item-label
    {
     min-height: 3.5em!important;
    }
    /* Move up the disclosure button to account for the list item height increase */
    .x-list .x-list-disclosure {
    position: absolute;
    bottom: 0.85em;
    right: 0.44em;
    }
    .list-item-title
    {
        float:left;
        /*width:100%; //this can't be 100% width*/
        width: 75%; //could be more if you need
        font-size:90%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right:25px;
        line-height:150%;
        /*margin-right:520px;*/
    }
    .list-item-qty
    {
        float:right;
        font-size:90%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right:25px; //You will need that when onItemDisclosure is set to true
        line-height:150%;
        clear: right;
    }
    .list-item-narrative
    {
        float:left;
        width:95%;
    
        font-size:90%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right:25px;
    }
    .x-item-selected .list-item-title
    {
        color:#ffffff;
    }
    .x-item-selected .list-item-narrative
    {
        color:#ffffff;
    }
    .notes-list-empty-text
    {
        padding:10px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dynamically loading movie clips (SWFS) into attached clips (from the library). The loaded
My data from getmovies.php is working correctly and loading into #moviesPage the FIRST time
In my ASP.Net page, I am loading data from server while scrolling using jQuery
I'm dynamically loading different content from db, using ajax. So, when I'm loading plain
I have read about dynamically loading your class files when needed in a function
I am dynamically loading a partial class with dropdownlists. The dropdownlists represent the many
I'm trying to set up jsTree to dynamically accept JSON data from django. This
I am trying to load values into a select dynamically using values from a
For my palm pre app I have a dynamically generated list (pulling in data
I need to dynamically load content from HTML emails into some type of content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.