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.

Unespected #__next > div

See original GitHub issue

Bug report

Describe the bug

Nextjs is rendering extra divs inside of #__next, and I don’t understand what generates them. Even removing all content from the page, the extra div is still in place.

023d2270-3538-4469-b495-6f87cdca0477-CleanShot%202019-09-09%20at%2023 56 27%402x

Worst thing is, I don’t seem to be able to target that in any way. I added the following to my custom _document.js file to target the extra div:

<style>
  {`
    html,
    body,
    #__next,
    #__next > div {
      height: 100%;
      margin: 0;
      padding: 0;
    }
  `}
</style>

However, in the HTML the > symbol is encoded to &gt; and I’m not able to escape it.

Expected behavior

Being able to target the extra div for styling, if not being able to get rid of it.

System information

  • Version of Next.js: 9.0.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rafaelalmeidatkcommented, Sep 13, 2019

The divs are from BaseProvider, remove it and the divs will go away. To style them, do it on _app.js instead of _document.js.

0reactions
balazsorban44commented, Jan 31, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js - using another <div></div> throws error, why? [closed]
This is because you are trying to pass 2 children but Next.js only expects one. I believe you are doing something like this:...
Read more >
Custom popup editor template in Kendo UI for jQuery - Telerik
Hi, i have a problem with custom my editable popup. The error is on k-editable, i can't use my template and the browser...
Read more >
Multiple unexpected k-overlay div elements added to Window ...
Bug report Multiple unexpected k-overlay div elements added to iframe Windows on the background on using toFront() method of another Window ...
Read more >
Error handling - Power Query | Microsoft Learn
An article on how to catch and handle errors in Power Query using the syntax try and otherwise.
Read more >
Handling Long and Unexpected Content in CSS
When applying the float label pattern for our forms, especially with a button on the right side. We should test this thoroughly to...
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