The positioning of UI elements has always been a little tricky thing. If this is you, then this blog post is for you to get out of this situation (hopefully!).
This blog post explains through examples the implications of using different CSS values for the CSS property -
position.
Note that this property applies to all elements. And margin is applied after the position offsets.
Also note that elements usually can be positioned using the
top |
bottom |
left |
right properties, that work differently depending on the positioning method mentioned below. And these properties will not work unless the position property is set first.
position: static | fixed | absolute | relative