SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to use z-index without using absolute positioning?

    Is it possible to use z-index without using absolute positioning?

    I want to make a cool background in flash that's animated, and I want it to display under some html text content.

    Here's what I'm referring to:
    http://216.69.151.46/DivTest.php

    Here I have a table with 3 columns and a header. I would use absolute positioning and tell both divs to be 150px from the top but the thing I realized, is if I ever make the header bigger, I would have to change the distance from the top also in css for the content area. Is it possible to just make the divs appear relative to the area it's in?

    I tried using position:relative but that didn't work. The div's just placed eachother one under the other in height but not in depth.

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  2. #2
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hindsight, I could just change the css distance from "top" if the header gets longer in height. I just hoped there would be a way for it to auto distance dependant on its current location without absolute positioning..

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  3. #3
    [Biped] LJK's Avatar
    Join Date
    Jun 2004
    Location
    In My Jammies
    Posts
    761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi -
    Worked for a bit on a non-tabular
    version, but not sure how usable it is;
    may point you in some new directions, tho ;-)

    Example

    El
    F-Fox 2.0 :: WIN :: el design :: US

  4. #4
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Thanks a lot LJK for taking a stab at it.
    I was attempting to do things in DIV but I'm afraid to because I haven't mastered it yet.

    I would do it on my own site first before doing a client's site.

    I noticed you still had to use absolute positioning for the object tag, I Guess there's no luck to make it relative to the container/parent it's in? Or am I misunderstanding absolute and relative?

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Line
    Is it possible to use z-index without using absolute positioning?
    Yes, z-index applies to positioned elements, which also includes position:relative and position:fixed.
    Simon Pieters

  6. #6
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow! that is amazing!
    Can you do the same with CSS menu's over flash as well?

  7. #7
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    0211382 haha i feel like a tard for showing people this because i haven't seen it done yet but yes you can.

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  8. #8
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Gosh, I'm gob Smacked. It's pretty straight foward in doing it. I'm in a middle of a project and wanted to do exactly what is shown here. Thanks a lot for the help. I was gonna make my menu's in 100% flash as I didn't have much choice but now I have and I am not compromising on the accessibility side of it either. Great Stuff! Thanks again.


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
  •