Earlier quoted context omitted.
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.
Wait, I have to hold my phone how in order to see the div? ಠ_ಠ
We finally learned to center a div, then browsers added sidebars
31–40 of 172 posts
Re: We finally learned to center a div, then browsers added sidebars
#32Meanwhile this website has learned how to break mouse scrolling.
Re: We finally learned to center a div, then browsers added sidebars
#33I'm 55 years old. My eyes are not what they used to be and neither are my glasses. I also own a copy of "Usage and Abusage" but I'll pass on that. Click on story link. My laptop renders a page - OK its black text on a white background (thank you but I doubt its a deliberate boon) ... ... why on earth is the offering a "page" ie emulating a printed page? In portrait! I'll accept that most people are not fixated about…
Re: We finally learned to center a div, then browsers added sidebars
#34Earlier 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.
Actually, they do, sort of. At least, if you use GLSL shaders. I remember some demo project using it in a way that made it appear that the website "sees" another window with the same website, which blew my mind when I saw it first. Cannot recall the name or anything else to locate it.
Re: We finally learned to center a div, then browsers added sidebars
#35Earlier 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.
As a rule, you should not add functionality to a website to compensate for browser misfeatures. People who want the browser to work differently can get a different browser: that's why we call them "user agents". Making the web all complicated like this mainly serves to make it harder for people to use alternative browsers, or for browsers to change their misfeatures without breaking compatibility.
Re: We finally learned to center a div, then browsers added sidebars
#36Earlier quoted context omitted.
Actually, they do, sort of. At least, if you use GLSL shaders. I remember some demo project using it in a way that made it appear that the website "sees" another window with the same website, which blew my mind when I saw it first. Cannot recall the name or anything else to locate it.
My guess is that you’re remembering this demo: https://xcancel.com/_nonfigurativ_/status/172732259457002734...
Re: We finally learned to center a div, then browsers added sidebars
#37Earlier 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.
Re: We finally learned to center a div, then browsers added sidebars
#38Re: We finally learned to center a div, then browsers added sidebars
#39Earlier 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.
The author should not intend that, and if they do, my browser should do its best to put a stop to it.
Re: We finally learned to center a div, then browsers added sidebars
#40This 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.
The same way the vertical centering counts the viewport height only, not the url bar and the tab bar.