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

  • Home
  • SEARCH
  • 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 8458409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:04:23+00:00 2026-06-10T13:04:23+00:00

I’m building an application that have to work on small screens (1024*768) or higher

  • 0

I’m building an application that have to work on “small” screens (1024*768) or higher resolution screen.

I have in the application a page that have some items presented in two columns. But on “small” screens, the width of the items is too large to keep a good layout, so I want to reduce the number of columns to one. The columns are build with a <ul> containing <li> with float:left attribute (this is actually a jQuery Sortable plugin output).

My behavior of the page is to allow users to drag and drop items between a “source” list and “target” list in order to select items (this is working and if it can help, I can paste the code).

To solve this issue, I have tried to set up a media query.

In my css file I have :

.sourceItems, .targetItems {
    list-style-type: none;
    float: left;
    margin: 0;
    padding: 0;
    margin-right: 10px;
    background: #eee;
    padding: 5px;
    border: solid 1px black;
    height: 400px;
    overflow: auto;
}

.sourceItems {
    width: 530px;
}

.targetItems {
    width: 280px;
}

    .sourceItems li, .targetItems li {
        border: solid 1px black;
        float: left;
        margin: 4px;
        padding: 4px;
        width: 220px;
        min-height: 10px;
        cursor: move;
        background-image: url('/_layouts/images/personresult.gif') !important;
        background-repeat: no-repeat !important;
        padding-left: 20px;
        background-color: #DFEFFC;
        background-position: left center !important;
    }

        .sourceItems li.user, .targetItems li.user {
        }

        .sourceItems li.entity, .targetItems li.entity {
            background-position: left center;
            border: solid 1px black;
            float: left;
            margin: 4px;
            padding: 4px;
            width: 200px;
            background-image: url('/_layouts/images/peopletitle.png') !important;
            font-size: 1.1em;
            height: 50px;
            cursor: move;
            padding-left: 40px;
            background-color: #CCFF99;
            background-repeat: no-repeat !important;
            vertical-align: middle;
        }

@media screen and (max-width: 1024) {
    .sourceItems {
        width: 200px;
    }

    .targetItems {
        width: 200px;
    }

        .sourceItems li, .targetItems li {
            margin: 2px;
            padding: 2px;
            width: 180px;
            min-height: 10px;
            background-image: url('/_layouts/images/personresult.gif') !important;
            -moz-background-size: 50%;
            -o-background-size: 50%;
            -webkit-background-size: 50%;
            background-size: 50%;
            background-repeat: no-repeat !important;
            padding-left: 10px;
            font-size: 1.1em;
        }

            .sourceItems li.user, .targetItems li.user {
            }

            .sourceItems li.entity, .targetItems li.entity {
                -moz-background-size: 50%;
                -o-background-size: 50%;
                -webkit-background-size: 50%;
                background-size: 50%;
                margin: 2px;
                padding: 2px;
                width: 180px;
                background-image: url('/_layouts/images/peopletitle.png') !important;
                font-size: 1.1em;
                height: 30px;
                padding-left: 20px;
            }
}

However, this makes not difference when the page load (the element is always two columns large).

Don’t know if it can help, but here is the dump of the DOM (from the IE developer tools) :

<UL class="sourceItems droptrue ui-sortable" jQuery172019945692622544986="151">
  <LI class="ui-state-default entity" jQuery172019945692622544986="75">some item 1</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="76">some item 2</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="77">some item 3</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="78">some item 4</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="79">some item 5</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="80">some item 6</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="81">some item 7</LI>
  <LI class="ui-state-default entity" jQuery172019945692622544986="82">some item 8</LI>
</UL>
<UL class="targetItems droptrue ui-sortable" jQuery172024919617247411335="152"></UL>

Here is a screenshot of the output with a “large screen”:

On a large screen

Here is a screenshot of the output with a “small screen”:

On a small screen

Here is a screenshot of the desired output on a “small screen” (tweaked the dom using IE dev tools to produce the screenshot:

Desired result

I’d appreciate any help that may help to solve this issue.

  • 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-10T13:04:24+00:00Added an answer on June 10, 2026 at 1:04 pm

    You are missing length prefix px/cm/in in

    @media screen and (max-width: 1024) {
                                  ^^^^ // Missing px   
    

    DEMO – (Not Working)

    It should be:

    @media screen and (max-width: 1024px) {
                                      ^^ // Added px
    

    DEMO – (Working)

    SEE REFERENCE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.