Live data from Hacker News

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

seg6.space

141–150 of 172 posts

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

#141
post #8

Meanwhile this website has learned how to break mouse scrolling.

That's because they are using a fixed-height container element with an "overflow: scroll" on it, which is needed to get that little grey bar at the bottom to complete the "page of paper on grey background" feel.

Which of course completely ignores that a page of paper can't scroll, but I guess doing it in a way where the content is split over multiple "pages" underneath each other is too complicated for a basic website - and would be even more jarring to the average reader.

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

#143
post #67

I'm confused about why this website is using less than half of my window for content. I understand wanting some margins, but a third of my window on each side seems pretty egregious. At least it's centered though!

Do you want them to add Subway Surfers in the sidebars? What would they display if there's nothing to display? This is such a weird criticism, do you think you want the text to use the full width? It would just be hard to read because of long lines, shorter lines are more comfortable

It's not like unused space results in some kind of waste, this is not paper, blank space is okay

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

#144
post #143
post #67

I'm confused about why this website is using less than half of my window for content. I understand wanting some margins, but a third of my window on each side seems pretty egregious. At least it's centered though!

Do you want them to add Subway Surfers in the sidebars? What would they display if there's nothing to display? This is such a weird criticism, do you think you want the text to use the full width? It would just be hard to read because of long lines, shorter lines are more comfortable It's not like unused space results in some kind of waste, this is not paper, blank space is okay

> It would just be hard to read because of long lines, shorter lines are more comfortable

That's a pretty subjective view, and one at odds with literally every other website I can think of

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

#145

Earlier quoted context omitted.

If only UX worried more about user preferences instead of coming up with these dogmatic rules. We can already resize the browser window if we want shorter lines.

I'm sure there's something going back to newspapers on this (though they would of course, fill multiple columns), but I can't help but suspect a lot of these UX studies are just predetermined to justify things like extra space on the margins for ads, "related content" distractions, and such things.

I've definitely never seen a newspaper that left over half of the page blank.

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

#146
post #15
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.

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.

So the website also wants to my monitor, and chair position and the angle from which I am looking? Got it.

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

#147
post #120

Earlier quoted context omitted.

Ah but see, exploiting a Chromium API has let us know you've got this second screen on the side, so we're centering the div on your overall work space. PS: if you switch from the touchpad to a wireless mouse, we'll move the div accordingly

1. Neither of my screen is to the side of the other. 2. The demo doesn't even work, the div stays centered in the viewport, not the program window when I open a side bar (Firefox). 3. Rarely does my browser even cover the center of my workspace, so it would be impossible to center anything in the center of my view without forcibly moving the program window from within the website.

Challenge accepted:

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_...

https://developer.mozilla.org/en-US/docs/Web/API/Window/move...

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

#148
post #98

Earlier quoted context omitted.

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

Are these broken popup menus and combo box dropdowns with us in the room right now? Yes, some things in some complex applications can break, but there are solutions and, practically, these particular things you listed simply aren't among those that break.

For example, the VS Code menu bar is broken because the drop-downs clip against the window frame, not the screen edges. The reason is different in this case, though (electron).

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

#149
post #145

Earlier quoted context omitted.

I'm sure there's something going back to newspapers on this (though they would of course, fill multiple columns), but I can't help but suspect a lot of these UX studies are just predetermined to justify things like extra space on the margins for ads, "related content" distractions, and such things.

I've definitely never seen a newspaper that left over half of the page blank.

I didn't say it so clearly but that's what I meant when I said they fill multiple columns. The columns themselves are narrow but there are many of them. I wouldn't mind the narrow widths as much, although this site is excessive, if there was a multi-column layout that filled the window. A lot of the annoyance is needing to scroll.

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

#150
post #97

Earlier quoted context omitted.

You'd be surprised

That's somehow controversial? There are kiosks used for public browsing, where the user has access to full browser app window and can change elements. There are also ways to get around kiosk mode restrictions, or at least there were for Windows in kiosk mode back in the day. We used it to get browsing access or to just mess with the kiosk. The fun!

A kiosk used for arbitrary public web browsing won't have expectations of physical buttons on the outside of the kiosk that line up with elements on the screen, which is what this branch of the thread brought up.
Post reply on HN