question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Element shift (empty space on the right)

See original GitHub issue

I have a <div> element I want to turn into an image, in a Quasar/Vue site. The image renders fine; however, the <hr> separators are shifted out of the element.

Here is the view of the DOM element (from Chrome):

DOM_chrome

Expected Behavior

hr_bug

Current Behavior

JPEG: COVID_Duesseldorf_Übersicht_24 12 2020 (15)

SVG (as a screenshot): hr_bug_2

Possible Solution

This problem seems to occur with both JPEG and SVG, and is not limited to html-to-image: I have the same issue with dom-to-image. Also, the <hr> elements themselves are not the problem; without them, the situation (black/white space on the right) remains the same. They just show what happens a bit clearer.

Steps To Reproduce

  1. Got to https://corona-duesseldorf.web.app/
  2. Click on blue “Als Bild herunterladen” (“Download as image”) button
  3. Compare

Your Environment

  • html-to-image: 1.3.20
  • OS: Windows
  • Browser: Chrome 87.0.4280.88 (64-bit), Firefox 81.0.2 (64-bit)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
issue-label-bot[bot]commented, Dec 26, 2020

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.62. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

0reactions
vivcat[bot]commented, Apr 10, 2022

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

position:relative leaves an empty space - css - Stack Overflow
Wherever the space appears (top, bottom, left, right) Just give a negative margin value on the element that was positioned relatively. Share.
Read more >
white-space - CSS: Cascading Style Sheets - MDN Web Docs
The white-space CSS property sets how white space inside an element is handled.
Read more >
Fighting the Space Between Inline Block Elements | CSS-Tricks
When using inline-block, aligning the elements left, right or center is extremely easy. Just use text-align! The inline-blocks act the same as ...
Read more >
CSS padding-right property - W3Schools
An element's padding is the space between its content and its border. The padding-right property sets the right padding (space) of an element....
Read more >
Spacing (margin and padding) - Webflow University
You can apply the same value to all sides of an element by holding Shift and dragging the padding/margin on one side. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found