How to resize an image and keep the imagemap coordinates when using text-align: center?

StackOverflow https://stackoverflow.com/questions/10579560

  •  08-06-2021
  •  | 
  •  

Вопрос

I am using ImageMapster to resize an image and change the "image map" coordinates to the new size. The image i am resizing is used as the background image, and is therefor centered in the middle of the screen:

CSS:

#block_content 
{    
    text-align:center;    
}

block_content is the container div of the image.

I am using code from this example: http://jsfiddle.net/JpgYm/8/

The problem is, that when im using text-align: center, the coordinates are not mapped correctly to the image. They are horizontally on the same line as the image, but a little off to the left.

Is there a way to fix this?

Это было полезно?

Решение

This was a bug. It should be fixed in the current build.

https://github.com/jamietre/ImageMapster

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top