Skip to main content

css z-index 1111 Responses

Last post: 1 year, 11 months ago | Thread started: Feb 21, 10, 11:23 a.m.

RespondNew TopicDisable Images

  • _niko

    I'm trying to place my logo div on top of two other divs within a centred layout but it's not working.
    The z-index works fine but It will not stay within the container div.
    this is my desired layout:

    http://www.silicagroup.com/nick/layout.jpg

    #logo
    {
    position:absolute;
    left:0px;
    top:0px;
    z-index:2;
    }

    <div id="container"><div id="logo"><img src="images/logo.png" /></div>
    <div class="nav"></div>
    <div class="image"></div>
    <div class="content"></div>

    </div>

    Feb 21, 10, 11:23 a.m. – Permalink
  • juhls

    Can you give us your whole code? Like at pastebin.com?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:24 a.m. – Permalink
  • jamble

    Have you given your container a position: relative; declaration?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:27 a.m. – Permalink
  • sisu

    position:relative; ?

    • Meant to be applied to #logo... not a response to jamblesisu
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:28 a.m. – Permalink
  • _niko

    this is my container
    #container {
    position:relative;
    margin: 0 auto;
    width: 990 px;
    }

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:30 a.m. – Permalink
  • acescence

    maybe asking the obvious here, but is #logo not inside #container?

    • it is, should it be somewhere else?_niko1/2
      oh, for some reason i ignored that html you postedacescence2/2
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:36 a.m. – Permalink
  • sisu

    #logo {
    position:relative;
    }

    • tried that, it positions it within the container but the z-index layering disappears._niko1/3
      hmmm, z-index:10 then?sisu2/3
      still doesn't work. hmm_niko3/3
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:41 a.m. – Permalink
  • ETM

    If its not inside the container its positioned absolute to the body.

    • < Ignore thatETM
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:41 a.m. – Permalink
  • ETM

    Full code? A local test shows no issue. A small thing, the #container div width wasn't recognized until I removed the space between the numerical value and the unit > 990 px to 990px.

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 11:56 a.m. – Permalink
  • _niko

    FFS.

    Thanks for all your help guys, it was that damn space.

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 12:02 p.m. – Permalink
  • juhls

    Just about to post that, haha. I even made this. Damn it, ETM :)
    http://queueban.com//niko/niko.h…

    • Sorry :DETM1/4
      OK, now I can get back to school work.juhls2/4
      for another few hours until the canada-US game starts ;)
      thanks again
      _niko3/4
      yup!juhls4/4
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 12:09 p.m. – Permalink
  • forcetwelve

    css is so damn picky ain't it?!

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earFeb 21, 10, 8:25 p.m. – Permalink

Login or Register to respond to this

Skip to main content