Results 1 to 4 of 4

Thread: Left vs. Margin-left, basic question (i should know this by now.)

  1. #1
    Join Date
    Mar 2010

    Left vs. Margin-left, basic question (i should know this by now.)

    I have an element that i am positioning with position:absolute and i honestly don't know if i should
    use left: or Margin-left?

    What is the rule of thumb for deciding which one to use.

    (i should know this by now!)

    big thanks


  2. #2
    Join Date
    Oct 2012
    I am not the expert in JavaScript,If you said position:absolute then I prefer using just "left". but "Margin-left" also should be working fine. I tried it.......

  3. #3
    Join Date
    Mar 2011
    To control the positioning of an element with position:absolute, use top or bottom to control the vertical position and left or right to control the horizontal position. It can seem like you're controlling position with the margin settings, but you're essentially just changing an offset from the default position settings for the element, and that may cause problems in the future.
    Rick Trethewey
    Rainbo Design

  4. #4
    Join Date
    Mar 2010
    thank you both for the help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center