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

Value for right: ignored on <img> #30

Closed
Smylers opened this issue Jan 14, 2013 · 1 comment
Closed

Value for right: ignored on <img> #30

Smylers opened this issue Jan 14, 2013 · 1 comment
Labels
bug Existing features not working as expected

Comments

@Smylers
Copy link
Contributor

Smylers commented Jan 14, 2013

Have a look at http://www.stripey.com/demo/weasyprint/abs_pos.html and its output in WeasyPrint: http://www.stripey.com/demo/weasyprint/abs_pos.pdf

The red squares are <span>s; the yellow ones <img>s.

The top pair have right: 5ex, which positions the <span> correctly, but on the <img> is being treated as right: 0.

The bottom pair show the workaround: using right: 0; margin-right: 5ex, which works on both the <span> and the <img>.

All 4 boxes are positioned as I'd expect in Firefox and Chromium.

@SimonSapin
Copy link
Member

Thanks for reporting this bug.

The layout of absolute positioning is different for "replaced" elements (such as images) and non-replaced elements. The former is apparently buggy in this case. I’ll look into it.

@liZe liZe closed this as completed in 3187fd8 Dec 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants