Live data from Hacker News

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

seg6.space

91–100 of 172 posts

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

#91
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.

It's also an extra information leak.

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

#93
post #24

Earlier quoted context omitted.

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.

Unless you have e.g. a kiosk with physical buttons below the screen an the labels on the screen.

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

#94

Earlier quoted context omitted.

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.

Unless you have e.g. a kiosk with physical buttons below the screen an the labels on the screen.

Kiosks by definition don't alow users to modify the ui. they run in kiosk mode

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

#95
post #19
post #15

Earlier quoted context omitted.

The point of centering an element horizontally is to make sure that the content you’re viewing is directly in front of you. Browsers with a sidebar shift the content to the right, assuming the sidebar is on the left, which I’ve come to dislike! Others have expressed the same preference, hence this little snippet on my website.

> The point of centering an element horizontally is to make sure that the content you’re viewing is directly in front of you. That's an awfully big assumption. For starters, you're assuming that the browser window itself is centered on the screen, and that the device is centered in front of the user. I don't think this is the point of centering an element horizontally at all, and the result you have created here is n…

I use Firefox with a vertical tabs extension open all the time. Occasionally (rarely, mind) I run into sites that don't bring their full content into view unless I hide the tabs list.

Guess they think like the OP.

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

#97
post #94

Earlier quoted context omitted.

Unless you have e.g. a kiosk with physical buttons below the screen an the labels on the screen.

Kiosks by definition don't alow users to modify the ui. they run in kiosk mode

You'd be surprised

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

#98
post #76

Earlier quoted context omitted.

While providing this information to websites without user permission is probably a longstanding mistake of web browsers, windowing systems withholding proper on-screen positioning from native applications is a bug in that system - a bad one.

Why? The window and its position shouldn't matter to the app. My tiling window manager doesn't care what your snowflake app thinks it wants, and I don't either.

Then continue to enjoy your broken popup menus and combo box drop downs, for starters.

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

#99

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…

> My immediate reaction to this is why is the browser giving the site this information, and could we stop.

That's my reaction to almost all new web APIs :|

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

#100
post #76

Earlier quoted context omitted.

While providing this information to websites without user permission is probably a longstanding mistake of web browsers, windowing systems withholding proper on-screen positioning from native applications is a bug in that system - a bad one.

Why? The window and its position shouldn't matter to the app. My tiling window manager doesn't care what your snowflake app thinks it wants, and I don't either.

The its only fair that complex applications don't care about how well they work under your snowflake WM either.
Post reply on HN