Dear HN. Please make the Hacker News header stick to the top of the browser

6 cbeach 10 9/16/2025, 11:00:50 PM
Dear HN team - please add the following styles to the top <tr> of the Hacker News UI so the header bar sticks to the top of the browser as we scroll down:

    position: sticky;
    top: 0;
    z-index: 10;

Comments (10)

collingreen · 57m ago
Dear HN, please encourage more user control over the web instead. Wouldn't it be nice if it was easy to do this from within your own individual browser?

There are plenty of extensions and such to let you do stuff but it would be cool if it became easy and normal and built in for users to adjust and control their experience instead of all the ad- and spyware nonsense.

denkmoon · 55m ago
No thanks. You can do it client side if you care. Are you not a hacker?
markus_zhang · 1h ago
Please don't. It reduces size and it's not far to pull up quickly.

Please make an option to turn it off if it is to be implemented.

MBCook · 45m ago
Why do people like this so much? It seems every web site does it these days and I HATE it personally.

It takes up precious screen space for something that isn’t useful enough to need to be on screen constantly. And I can always just tap the top of the screen to jump to the top in a fraction of a second.

Bender · 53m ago
This could probably be done in uBlock in My Filters.
anfractuosity · 38m ago
Yup the following seemed to work for me -

news.ycombinator.com###hnmain > tbody > tr:first-child:style( position: sticky; top: 0; z-index: 10;)

Bender · 28m ago
Confirmed that works here.
TheCleric · 57m ago
No thanks.
wizzwizz4 · 50m ago
Why do you need z-index?

  /* ==UserStyle==
  @name           HN sticky topbar
  @namespace      https://news.ycombinator.com/user?id=wizzwizz4
  @version        1.0.0
  @description    Pins the HN topbar to the top of the viewport.
  @author         wizzwizz4
  ==/UserStyle== */
  
  @-moz-document domain("news.ycombinator.com") {
      #hnmain > tbody > tr:first-child {
          position: sticky;
          top: 0;
      }
  }
https://addons.mozilla.org/firefox/addon/styl-us/
wizzwizz4 · 33m ago
Adding a z-index was a hack to workaround the .rotate180 class creating a new stacking context, causing downvotes to be rendered over the sticky topbar. This is hella overengineered. https://news.ycombinator.com/triangle.svg is 131 bytes!

  <svg height="32" viewBox="0 0 32 16" width="32" xmlns="http://www.w3.org/2000/svg"><path d="m2 27 14-29 14 29z" fill="#999"/></svg>
Meanwhile, the relevant section of https://news.ycombinator.com/news.css is much larger:

  .rotate180 {
    -webkit-transform: rotate(180deg);  /* Chrome and other webkit browsers */
    -moz-transform:    rotate(180deg);  /* FF */
    -o-transform:      rotate(180deg);  /* Opera */
    -ms-transform:     rotate(180deg);  /* IE9 */
    transform:         rotate(180deg);  /* W3C complaint browsers */
  
    /* IE8 and below */
    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, DX=0, DY=0, SizingMethod='auto expand')";
  }
Just having a separate triangleup.svg and triangledown.svg would save bandwidth and rendering time, and make naïvely-written userstyles work properly! I thought Hacker News, of all websites, would be free from dodgy overengineered CSS…