Jump to content

position-left vs margin-left


Mark and two Cats

Recommended Posts

If you use position, then the element is allowed to occupy the same space as other elements that are surrounding it. This allows for overlapping which is usually not desirable.

Link to comment
Share on other sites

Have you copied that correctly? There is no position-left property. There is a left property, but it can be used only when the position property is set to something other than the default value, which is static.

Link to comment
Share on other sites

Have you copied that correctly? There is no position-left property. There is a left property, but it can be used only when the position property is set to something other than the default value, which is static.
Oops - I meant...left:10px and margin-left:10px toldya I'm a newb :)
Link to comment
Share on other sites

As Ingolme suggested, to make left or right coordinates work, you have to use some positioning mode other than the default mode. For some things this is necessary, but for a garden-variety page, it's best to position elements with margins and floats (if you need them). We're always fielding questions from people who use absolute positioning and suddenly discover their page is ruined if it loads into a display with a different resolution.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...