Absolute Positioning
To position an element absolutely (that is, by coordinates), you need to specify the element's coordinates as well as a reference from where to position it.
With the absolute-content
module, you can make this dependency obvious by declaring one element as the
positioning reference, and another as the positioned content.
More importantly, you can absolutely or statically position elements as needed, based on device state. Because often times, you may want elements placed on top of each other on large displays, but below one another on smaller devices.
Usage
To position an element within another, apply the absolute-reference
class to the container,
and the absolute-content
class to the content.
For the actual coordinates, set the appropriate top
, right
, bottom
, and left
CSS properties in the positioned element's style
attribute.
State-specific Positioning
Stacking elements doesn't make a lot of sense when the top element eats up most of the available space, which is often the case on small devices.
If you want to absolutely position an element in one state, but not the other, use the appropriate state-prefixed classes.