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.
We finally learned to center a div, then browsers added sidebars
11–20 of 172 posts
Re: We finally learned to center a div, then browsers added sidebars
#12I had no idea what this was talking about at first because I had JS blocked, so nothing special seemed to happen when I opened the bookmarks panel. This looks absolutely goofy. I don't know why you'd want the content potentially getting covered by unrelated UI elements.
Here in Canada, the mobile website for anything related to Indian immigration (Indian passport, visa etc) is done via this absolutely goofy website with multiple levels of UI elements and popups covering the content. Have a look on mobile:
https://www.blsindia-canada.com/ottawa-jurisdiction/index.ph...
Re: We finally learned to center a div, then browsers added sidebars
#13Earlier 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? ಠ_ಠ
Re: We finally learned to center a div, then browsers added sidebars
#14Anyway, I wouldn't say it currently behaves nicely (like something I would like to reuse anywhere whatsoever). Tested on Firefox opening Bookmarks on the left. First off, there is this ugly flicker, as browser first renders the "wrong" version, then your JS "fixes" it. Second, there is some concurrency problem, as by opening and closing Bookmarks repeatedly I somehow managed to render both versions: centered to viewport and covered by sidebar.
And, yeah, as others have said, I also think that allowing sidebar to cover your webpage content is absolutely bogus and don't foresee myself wanting this behavior, ever. But that's up to you.
Re: We finally learned to center a div, then browsers added sidebars
#15This 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.
Re: We finally learned to center a div, then browsers added sidebars
#161) 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 reaction to this is why is the browser giving the site this information, and could we stop.
Re: We finally learned to center a div, then browsers added sidebars
#17This 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.
Same. Thank heavens the website doesn't know the position of the browser's window in respect to the screen it's on.
Re: We finally learned to center a div, then browsers added sidebars
#18This 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.
Re: We finally learned to center a div, then browsers added sidebars
#19This 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.
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 not at all what I as a user want.
Re: We finally learned to center a div, then browsers added sidebars
#20Earlier 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? ಠ_ಠ