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

Image is a litter wider than its parent block #72

Closed
calfzhou opened this issue Nov 17, 2013 · 1 comment
Closed

Image is a litter wider than its parent block #72

calfzhou opened this issue Nov 17, 2013 · 1 comment
Milestone

Comments

@calfzhou
Copy link
Contributor

This difference will be much bigger for reST figure directive, since it uses 1.5em margin for both div and img.

For markdown, the difference is not so big, but you can still observe it:

  • parent <p> block

image

  • <img> block

image

Here the p tag has 20px 0 20px 0 margin, 0 border and 0 padding. And the img tag has 0 margin, 2px border and 5px padding. Image's width is limited by max-width: 100%;, so now it should have the same width with parent p tag. But img block's width should add margin, border and padding together. Thus, 2px + 5px + 459px + 5px + 2px = 473px. The visual effect is that the image seems to be placed a little right, and might overlay right sidebar in some cases.

@talha131
Copy link
Member

Thank you @calfzhou for reporting this issue. I have fixed it to the best of my knowledge.

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

No branches or pull requests

2 participants