Live data from Hacker News

The complete guide to centering a div

tipue.com

101–110 of 170 posts

Re: The complete guide to centering a div

#101

Earlier quoted context omitted.

The thing that boggles my mind is that we're over ten years and three major versions in and we can't center stuff reliably or conveniently, images won't scale up to fit (only down...), multi-column text is barely implemented and Google is ripping it out, the box model is borked by default, it's non-trivial to determine the layering of UI elements, and so on. It's amazing that we get solutions for things that no-one r…

"It's amazing that we get solutions for things that no-one really needs (animated 3d transitions...)" I believe you will see some really amazing animated 3d ransitions used in production very soon, and they happen to be necessarily for the user experience, reducing needed document space for larger amounts of visual blocks.. at least in the projects I know they are being developed on.

CSS 3D is lovely, but it would be nice if they -- Apple, Microsoft, Firefox, and (especially) Google -- took care of freaking business.

The latest Chrome on Windows has completely screwed up select controls for no apparent reason -- they do things like fade and zoom in, but don't actually work properly (I'm a Mac guy, but our Windows guy has been cursing Chrome for days).

Re: The complete guide to centering a div

#102

Earlier quoted context omitted.

The thing that boggles my mind is that we're over ten years and three major versions in and we can't center stuff reliably or conveniently, images won't scale up to fit (only down...), multi-column text is barely implemented and Google is ripping it out, the box model is borked by default, it's non-trivial to determine the layering of UI elements, and so on. It's amazing that we get solutions for things that no-one r…

Good thing we are practically putting all our eggs in this basket. HTML and CSS will be our document structure, and javascript will describe how the document behaves. Truly a universal standard for the ages. Humans are dumb.

Javascript gets a lot of shit, but really the biggest WTFs are HTML and especially CSS. Javascript at least has Crockford. No-one really has a handle on how to deal with CSS -- it's a wall-to-wall disaster.

Re: The complete guide to centering a div

#103

Whenever anybody says that CSS is easy, or "of course you can do that with CSS", or even hints that CSS is somehow well-designed... ...the only thing I really need to say, is that every couple months, on Hacker News, where a lot of really smart people hang out, a new top-voted story comes up about how to center a div . With tons of comments and discussion too. And it's not even a joke. What more is there to say?

Anytime someone says CSS is well designed, ask them how to vertically center something and look at their face as they go through the five stages of grief.

I'm pretty good at CSS I suppose, and it's not something you can learn logically and progressively. You have to learn all the weird nuances and quirks of it as well as the syntax.

EDIT: speaking of CSS, if you want to know true pain and nothingness, try making responsive emails that look good at three sizes on several clients in CSS.

Re: The complete guide to centering a div

#104
post #48

Whenever anybody says that CSS is easy, or "of course you can do that with CSS", or even hints that CSS is somehow well-designed... ...the only thing I really need to say, is that every couple months, on Hacker News, where a lot of really smart people hang out, a new top-voted story comes up about how to center a div . With tons of comments and discussion too. And it's not even a joke. What more is there to say?

Next week: The complete guide to sticky footers! It's unbelievable just how annoying CSS can be for seemingly simple things.

Honestly, please don't use sticky footers. I curse CSS not because that's difficult, but because it's possible. :/

Re: The complete guide to centering a div

#105

Earlier quoted context omitted.

Generally I agree that too many people have a fetish about avoiding tables when it's clearly the right tool for the job. But I've definitely been bitten by using them. Table layouts don't play well with other CSS properties.

Depending on how you do the layout it also may not play well with screenreaders.

Why do people care about screen readers? Is it because they are good people and want to make sure sight-impaired visitors are able to access their content? Or is it because they have contracts that require 508 compliance?

Re: The complete guide to centering a div

#107

Earlier quoted context omitted.

Depending on how you do the layout it also may not play well with screenreaders.

Why do people care about screen readers? Is it because they are good people and want to make sure sight-impaired visitors are able to access their content? Or is it because they have contracts that require 508 compliance?

I guess it's a good question. At a recent conference it [website accessibility] was described as the digital equivalent to putting a ramp in at your door.

Where I work at the moment I'm required to comply with WCAG2 AA at a minimum.

Re: The complete guide to centering a div

#108

Earlier quoted context omitted.

Good thing we are practically putting all our eggs in this basket. HTML and CSS will be our document structure, and javascript will describe how the document behaves. Truly a universal standard for the ages. Humans are dumb.

Javascript gets a lot of shit, but really the biggest WTFs are HTML and especially CSS. Javascript at least has Crockford. No-one really has a handle on how to deal with CSS -- it's a wall-to-wall disaster.

Preprocessing languages like SASS help a little. They don't really fix the ugly parts, but do help shove them under the bed a little more

Re: The complete guide to centering a div

#110
post #29

Earlier quoted context omitted.

Obviously you can't show off css in the same browser window as your text, that would be insane. No, you have to load up a completely different website, that makes much more sense.

CodePen shows live code that can be edited and played around with. It does make sense.

No, it does not. It is good to be able to play around with the code, but to require someone to see the code working it is overkill.
Post reply on HN