We finally learned to center a div, then browsers added sidebars
1–10 of 172 posts
Re: We finally learned to center a div, then browsers added sidebars
#2Centering a div? Impossible.
Re: We finally learned to center a div, then browsers added sidebars
#3margin:0 auto is the (probably incorrect) incantation I have always reached for
Re: We finally learned to center a div, then browsers added sidebars
#4This 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
#5margin:0 auto is the (probably incorrect) incantation I have always reached for
That's fine but it only centres horizontally. Usually when people talk about "the div centring problem" they mean x and y, dead centre (as this article is).
Re: We finally learned to center a div, then browsers added sidebars
#6I think the scrollbar-gutter property helps with this.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...
Re: We finally learned to center a div, then browsers added sidebars
#7This 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
#8Meanwhile this website has learned how to break mouse scrolling.
Re: We finally learned to center a div, then browsers added sidebars
#9This 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.
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
#10I 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.