#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    103
    Rep Power
    5

    Postition problems


    im trying to get generic position for these divs i have
    i dont care where it is on the page, but i want all of these divs to have top:0px; and left:0px; in the same spot so i try to set this and i try all of the position values: static, absolute, fixed, relative and inherit.
    absolute and fixed break the positioning in a way i do not want. each div i am working on has a "shadow div" and the whole point of all of this is to get each yellow div on top of its red "shadow div". absolute and fixed make this impossible i think.
    static, inherit and relative do not change the top:0px; left 0px; spot
    any ideas guys?
    http://patrickallardcomputerwhiz.com/pacw2/
    Last edited by chopficaro; April 7th, 2013 at 05:11 PM.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,009
    Rep Power
    2791
    Try again. As a member for over 3 years and 80 posts, there is no excuse for this type of post.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    103
    Rep Power
    5
    i been doing other stuff
    found the soluition
    To position divs on top of one another give each position:absolute and wrap them all in another div with position:relative
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,128
    Rep Power
    4304
    Congrats on figuring it out.

    You don't have to give them both "position:absolute". The one with the real content can have "position:relative".
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo