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.

How to remove document margin?

See original GitHub issue

I’m trying to remove document margin, so I can paint/handle it myself accordingly to the page I’m on. But it seems the only way to do it is adding negative margin to @page as margin: 0mm; doesn’t works at all.

How can I fully remove the document margin?

captura de tela 2018-05-27 as 02 06 06

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
goshatchcommented, Oct 3, 2019

Has there been any updates on the right side white stripe issue? Just betting on A4 working well because it’s the default doesn’t solve my use case unfortunately.

1reaction
frocommented, Dec 12, 2019

No matter the parameters, nothing can prevent the white strip to appear up, right, down. Here’s what I have tried:

@page {
  // default
}

@page {
  margin: 0px 0px 0px 0px;
}

@page {
  -relaxed-page-size: A4;
  size: A4;
}

@page {
  -relaxed-page-width: 210mm;
  -relaxed-page-height: 297mm;
  size: 210mm 297mm;
}

@page {
  -relaxed-page-width: 210mm;
  -relaxed-page-height: 297mm;
  -relaxed-page-size: A4;
  size: A4;
  margin: 0px 0px 0px 0px;
}

@page {
  -relaxed-page-width: 210mm;
  -relaxed-page-height: 297mm;
  size: 210mm 297mm;
  margin: 0px 0px 0px 0px;
}

The best I can do is 21,01 × 29,71 cm instead of 210 mm × 297 mm.

My two cents, @Zulko is right about the float precision.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I remove page margins in Word? - Super User
select marginated text> page layout>margins>custom margins>layout>Border> None I hope it works. Share.
Read more >
How to Get Rid of the Top Margin in Word
Click the bottom arrow in the “Top” text box in the Margins section. Keep clicking this arrow to decrease the value to “0”...
Read more >
Techniques for eliminating a documents' default margins
Eliminating the document margin using legacy HTML attributes ... The first four attributes remove the page's margins in IE, while the later two...
Read more >
How to Remove the Margin Lines From a Word Document
Dotted Margin Lines Create Rectangle on the Document ... Start by clicking on the "Tools" menu. Select "Options." Click on the "View" tab...
Read more >
Removing body margin in CSS - html - Stack Overflow
In your case it's the h1 causing your problem. It has { margin: .67em } by default. If you set it to 0...
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