Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding Left and Padding Right causing incorrect maps #114

Open
riegel opened this issue Aug 28, 2017 · 2 comments
Open

Padding Left and Padding Right causing incorrect maps #114

riegel opened this issue Aug 28, 2017 · 2 comments

Comments

@riegel
Copy link

riegel commented Aug 28, 2017

To demonstrate the problem you can go to your demo http://mattstow.com/experiment/responsive-image-maps/rwd-image-maps.html#ppg with the PowerPuff Girls graphic, use the inspector to add...

  img[usemap] {padding-left:40px;}

You will see the maps are now off by 40 pixels

@stowball
Copy link
Owner

I wouldn't put padding directly on an image. In fact, in the 15 years I've been a front-end dev, I never have; it just seems too unpredictable imo.

I'd suggest to just put the padding on a wrapping element.

@aleshh
Copy link

aleshh commented Jul 30, 2018

Had a sneaky problem where all targets were shifted to the left, removing padding on the image fixed it.

I've never heard of padding on a image being bad practice, but yeah, it's easy enough to work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants