SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    noob: css left right px movement

    when you say left:-450px, where does the (0,0) coordinate start from, top right hand corner of the brower?
    left-450px moves right 450 px?
    if left: 450px, then it moves left 450px from right position?

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    left is relative to the left edge of the element.
    right is relative to the right edge of the element etc..

    So if you set everything to 0 it should stretch the element to the full height/width of the parent, though IE doesn't do this.

    left-450px moves right 450 px?
    No it doesn't
    left: -450px; would move the left edge of the element 450px left.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not only that, but the coordinates 0, 0 refer to "top left" as well. Think of a clock, or a box. You start at 12:00 then move to 3:00 then 6:00 then 9:00 and back to 12. With a box, you normally start in the upper left hand corner, draw a line to the right, then go down, stop and draw a line to the left, and then go back up again to close it.

    Same thing here.


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
  •