logoalt Hacker News

kccqzyyesterday at 11:17 PM3 repliesview on HN

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.


Replies

seba_dos1yesterday at 11:27 PM

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

show 2 replies
kazinatortoday at 1:53 AM

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.

seg6yesterday at 11:57 PM

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.

show 5 replies