Results 1 to 4 of 4

Thread: Div overlap

  1. #1
    Join Date
    Oct 2010
    Posts
    19
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Div overlap

    What i want to do is this:
    HTML Code:
        |                |
     ---|    Logo        |------------------
    |   |________________|  Links              |
    |             Content                      |
    Although i cant get this fixed.
    I know there is a way this:
    HTML Code:
    position: absolute;
    z-index:2;
    But i want to have my divs as follow:
    HTML Code:
    float:left;
    But why i used float:left; i can't use z-index:2; anybody know how to solve this?
    Thanks for advance.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Give it a relative position and give z-index:2;
    Jeremy | jfein.net

  3. #3
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    If you want your logo to appear above everything else, then try a bigger number for your z-index like 9999

  4. #4
    Join Date
    Dec 2010
    Location
    Hyderabad, India
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Code:
    #wrapper {
    margin: 0 auto;
    }
    
    #logo { /* which is inside wrapper */
    position: absolute;
    display: block;
    margin-left: 100px; /* sample */
    margin-top: 50px; /* sample */
    z-index: 9999; /* like above poster says, but should not be an issue afaik */
    }
    
    #belowdiv { /* comes after logo in HTML and doesn't matter */
    float: left;
    }

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
  •