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 3490106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:28:33+00:00 2026-05-18T11:28:33+00:00

First of all I am a programmer (Python, C, Java, Delphi, whatever) and not

  • 0

First of all I am a programmer (Python, C, Java, Delphi, whatever) and not a web developer/designer. I am trying hard to be (when asked) so please bear with me. 🙂

I have a map (background image of div). On the map I have placed some cities (div with image). Underneath the cities there are cars (div with image, too). Each car can travel to any city (drag-drop, I am working on this now). Cities and cars, when clicked-once, show pop up dialogs with extra information.

Up to here, no news. What a normal programmer would want is to have the map on the first level (i.e. z-index 0) cities on the next (i.e. z-index 10) cars on the next (z-index 20 because when dragged and dropped cars should appear above the cities and not bellow) and finally above all the popups (z-index 999).

However this is not the case. Cars when dragged “fly” above some cities and “pass” below some other (depending if they were placed before or after the city while rendering the page, I suppose).

I was trying hard to place a div (to draw lines) in between the map div and the cities (ie z-index 5) but to no avail.

Popups also have problems.

I also tried this piece of code:

jQuery(document).ready(function(){
   map_zindex = $("#map").css("z-index");
   $(".city").css("z-index", map_zindex+10);
   $(".car").css("z-index", map_zindex+100);
   $(".popup").css("z-index", map_zindex+200);
}); 

Still nothing changes (not even a small progress). Nothing. Worst of all, when checking with Firebug I was getting a z-index: auto; to all of those elements.

I know I must be doing something completely wrong, but what is it? I hope my dislike for CSS is not causing all this mess.

  • 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-05-18T11:28:34+00:00Added an answer on May 18, 2026 at 11:28 am

    Positioned elements (absolutely or relatively) will always have a higher z-index than other elements, so unless you position all your elements (you don’t need to set their top and left values, just their position value), this will be a possible cause of some problems.

    However, since you’re saying the elements show up as z-index: auto in firebug, I suspect something else is wrong. Is the z-index applied only with jQuery? In that case, it looks like the code is being executed before the elements are available on the page. Otherwise, please give us a js fiddle recreating this error.

    Also note that with jQuery draggables, you can alter their z-index as they are dragged:
    http://jqueryui.com/demos/draggable/#visual-feedback

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

Sidebar

Related Questions

first of all, I'm not a programmer, so the answer to this might be
First of all, I know how to build a Java application. But I have
First of all: I am not an experienced ClearCase user, but I have lots
First of all there is a partial question regarding this, but it is not
First of all, I'm not looking for miracle... I know how PHP works and
First of all, I will admit I am a novice to web services, although
1st of all: I'm not a programmer, never learnt programming/algorithms. Actually I have to
I've noticed that I can not use all unicode characters in my python source
OK first of all, I am a PHP programmer but I have never done
First of all, sorry, but my English is not very good. I'm at the

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.