| ▲ | seg6 an hour ago | |||||||
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. | ||||||||
| ▲ | stevage an hour ago | parent | next [-] | |||||||
> The point of centering an element horizontally is to make sure that the content you’re viewing is directly in front of you. 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. | ||||||||
| ▲ | nkrisc an hour ago | parent | prev | next [-] | |||||||
Joke’s on you: my browser window isn’t centered. | ||||||||
| ▲ | scubbo 44 minutes ago | parent | prev | next [-] | |||||||
I salute your dedication to understanding and fixing a problem that bothers you - but I must add my voice to those who think that this is not a good design for general use. The viewport is the region within which content should be positioned, and thus within which they should be centred. By your logic, left-aligned content in a browser with a left sidebar should be deliberately covered. | ||||||||
| ▲ | wat10000 29 minutes ago | parent | prev | next [-] | |||||||
This all sounds like a really elaborate way of not taking advantage of the fact that modern windowing operating systems don't require windows to be full screen, and allow you to position the sides of your browser window wherever you want them to be. | ||||||||
| ▲ | wizzwizz4 an hour ago | parent | prev [-] | |||||||
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. | ||||||||
| ||||||||