Mark and two Cats Posted April 9, 2013 Share Posted April 9, 2013 What's the diff between eg: position-left:10px and margin-left:10px They seem to do the same thing. Thanks from a newbie! Best Regards,-Mark and two Cats Link to comment Share on other sites More sharing options...
Ingolme Posted April 9, 2013 Share Posted April 9, 2013 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 More sharing options...
jeffman Posted April 9, 2013 Share Posted April 9, 2013 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 More sharing options...
Mark and two Cats Posted April 10, 2013 Author Share Posted April 10, 2013 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 More sharing options...
jeffman Posted April 10, 2013 Share Posted April 10, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now