Closed Thread
Results 1 to 2 of 2

Thread: z-index problem

  1. #1
    tomitzel is offline Learning Programmer
    Join Date
    Jul 2008
    Location
    Romania
    Posts
    44
    Rep Power
    0

    Question z-index problem

    Hello,
    I have a div name "container" which contains another div called "sidebar_left", which has another div called "red_rectangle", something like this:
    Code:
    <div id="container">
       <div id="sidebar_left">
          <div class="red_rectangle">
           </div>
        </div>
    </div>
    I want that the background from the container to be on top of the background of the red_rectangle. I tried z-index, but does not work or I might be using it wrong:
    Code:
    #container {
    z-index: 999;
    }
    #sidebar_left {
    z-index: 1;
    }
    #sidebar_left .red_rectangle {
    z-index: 1;
    }
    Any advice?
    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    cdg10620's Avatar
    cdg10620 is offline Programming Expert
    Join Date
    Jun 2009
    Location
    Texas
    Posts
    387
    Blog Entries
    3
    Rep Power
    12

    Re: z-index problem

    If you want the background from container to be on top of the background of the red rectangle while the red rectangle is still on top you should be able to set it like this:

    Code:
    #container {
    z-index:1;
    }
    
    #sidebar_left{
    z-index: 0;
    }
    
    #sidebar_left .red_rectangle{
    z-index: 2;
    }
    See if something like that works.
    -CDG10620
    Software Developer

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. A-Z Index
    By jwg2s in forum PHP Development
    Replies: 2
    Last Post: 06-07-2011, 08:54 AM
  2. cakephp index.ctp problem
    By hlsrinivasamurthy in forum PHP Development
    Replies: 0
    Last Post: 09-28-2010, 02:15 AM
  3. Replies: 7
    Last Post: 01-24-2010, 10:02 PM
  4. Using array index
    By gaylo565 in forum C# Programming
    Replies: 3
    Last Post: 05-16-2008, 09:19 AM
  5. Replies: 3
    Last Post: 08-16-2007, 04:49 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts