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.

[Segment] [Header] Top attached header has a negative margin-top

See original GitHub issue

See the following fiddle: https://jsfiddle.net/3rf9jtdu/

I argue that the top alignment of the first table cell’s segment (top left segment) should be the same as the header’s top alignment (top right). However, the header is the :first-child of a table, so it ends up having a negative margin, pulling it out of the padding of the table cell, and thus is out of alignment.

Issue Analytics

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

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Alternative to negative margins - css - Stack Overflow
This image shows what I'm doing. The English flag has the negative margin but the Chinese flag displays below the header because it's...
Read more >
Default margins for header and footer are already added #3672
If I am giving margin-top value as some negative value, then the header seems to move upwards but it also applies the same...
Read more >
8 Box model - W3C
A box's own margins collapse if the 'min-height' property is zero, and it has neither top or bottom borders nor top or bottom...
Read more >
Negative Margins - CSS-Tricks
If you switch from REM to EM in your example pen, the header is no longer contained within its parent. Any idea as...
Read more >
Building A Dynamic Header With Intersection Observer
The target element will be considered to be intersecting relative to the margins. The scroll root with positive and negative root margin values....
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