Forum How do I...?

Absolute positioning without regarding page margins?

twantzen
Hello together,

is it possible to position an element absolutely without regarding the page margins (i.e. x/y zero/zero point = first pixel in the upper left corner)?

Let’s asume we defined `@page { margin: 10mm; }`, with `position: absolute` I have to define
element {
  position: absolute;
  top: -13mm;
  left: -13mm;
  width: [...]
}

to get the element 3mm into bleed. This is potentially error prone, if page margins where altered in the future.

Thanks, Tobias
mikeday
Perhaps you could specify the page margin with a CSS variable?
twantzen
Thanks, Mike! So that’s a "No" combined with a great idea – thanks!