Jump to content

2 other questions :)


zeidhaddadin

Recommended Posts

As I am sure you have already come across, you will get different results depending on what you use.position:absolute -- (Per W3C) With a value of "absolute" the element can be placed anywhere on a page. The element's position is specified with the "left", "top", "right", and "bottom" properties.Meaning, that you can set the exact location of an item on the screen by giving it the top and left coordinates.So: position:absolute;top:20px;left:30px; will put an object 20px from the top and 30px from the left of the screen.-----------------position:relative -- (Per W3C) Moves an element relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position.Meaning, that wherever the object is on the screen, it will get moved relative to wherever it already is.So: position:relative;top:20px;left:30px; will put an object on the screen 20px from the top and 30px from the left of its CURRENT position.------------------For padding and margin, lets say you have 3 boxes. You want to make sure the boxes are 10px apart from each other. That is your margin. It is the space outside of the object.Now that you have your 10px margin around your boxes, lets say you want the objects inside your box to stay 5px away from the edge of the inside of the box. That is your padding.Funky explanation(s) hope this helps!

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...