[whatwg] Registration points for elements

Mikko Rantalainen mikko.rantalainen at peda.net
Wed Jan 9 22:24:11 PST 2013

Ian Hickson, 2013-01-08 18:23 (Europe/Helsinki):
> You can do this with anything in HTML, using absolute positioning: set 
> just one of the coordinates in each direction, and leave the other on 
> 'auto'. As in:
>    div { position: absolute: bottom: 10em; right: 10em; width: auto;
>          height: auto; left; auto; top: auto; margin: 0; }

That will work if you only want to use one of the element's corners as
the anchored point. However, CSS does not provide a way to position the
center of the element and use "width: auto" and "height: auto". Even
more advanced would be a feature to define anchored point to be some
percentage of the width and height and then absolutely position that.
However, that feature is missing, too.


More information about the whatwg mailing list