Live data from Hacker News

We finally learned to center a div, then browsers added sidebars

seg6.space

41–50 of 172 posts

Re: We finally learned to center a div, then browsers added sidebars

#41

Earlier quoted context omitted.

Same. Thank heavens the website doesn't know the position of the browser's window in respect to the screen it's on.

Wait until they realize that on mobile they can use accelerometer data to keep the element in the same position in space across translations of the device.

So the content falls down at 10 m/s^2 unless you're falling alongside it.

Re: We finally learned to center a div, then browsers added sidebars

#44
post #8

Meanwhile this website has learned how to break mouse scrolling.

What do you mean? On macOS Safari I see a scroll bar that I can drag with my mouse if I wish.

Scrolling the page with mousewheel/multitouch doesn't work unless the pointer is inside the white area

...appears it's been fixed since my original comment. There's still no scrollbar in the expected place on the side of my browser window though.

Re: We finally learned to center a div, then browsers added sidebars

#48
post #24

The net result of what this site is doing seems to result in one of two effects when I open the sidebar, randomly: 1) the sidebar covers the content, while the content has blank space to the right, or 2) the content moves off the right edge of the screen, leaving a large blank space to its left. Both of these are wrong. If I have a sidebar open, the site is now narrower , stop trying to be clever. My immediate reacti…

Agreed, both outcomes are bugs and neither is intended. The idea is simply that, content the site author intended to be horizontally centered stays literally centered on my screen when browser UI changes the viewport.

That results in the first outcome: the content is centered on the screen, which puts it under the sidebar, while there's perfectly good space being ignored off to the right of it.

It's a cute trick, please don't use it, this is one of many reasons why. If I have a sidebar open, it's because that space is not yours to care about.

Re: We finally learned to center a div, then browsers added sidebars

#49
post #24

The net result of what this site is doing seems to result in one of two effects when I open the sidebar, randomly: 1) the sidebar covers the content, while the content has blank space to the right, or 2) the content moves off the right edge of the screen, leaving a large blank space to its left. Both of these are wrong. If I have a sidebar open, the site is now narrower , stop trying to be clever. My immediate reacti…

Agreed, both outcomes are bugs and neither is intended. The idea is simply that, content the site author intended to be horizontally centered stays literally centered on my screen when browser UI changes the viewport.

This is a nonsensical goal.

If I drag a browser window to the right, making it cover the right-hand half of my monitor, it serves no useful purpose for "centered" content to migrate to the left edge of the window (the physical midpoint of the screen).

Centered means centered within the virtual viewport, not the physical screen.

Re: We finally learned to center a div, then browsers added sidebars

#50
post #4

This might be some kind of a weird requirement for a piece of art, but I would literally never expect a website to center a div according to the browser window instead of the viewport. It just looks wrong and feels wrong.

Televisions used to have "sidebars", like a speaker on one side only, with some knobs co-located there also. Yet a test pattern would center in the picture tube, not the TV box.
Post reply on HN