News for hackers. Stuff that matters.
Re:iPhone 5 web teardown: How Apple compresses video using J... by scotty79 on Monday September 17, 2012 @03:35AM (#4531609)
Right. Now center it vertically. Also don't make any assumptions (like fixed height, or display: block) about container and the box to be centered.
Re:iPhone 5 web teardown: How Apple compresses video using J... by rimantas on Monday September 17, 2012 @08:28AM (#4532198)
http://cssdeck.com/labs/aqdw0l21/0

Container has fixed dimensions in my example, but it does not matter in this case.

Re:iPhone 5 web teardown: How Apple compresses video using J... by scotty79 on Tuesday September 18, 2012 @02:32AM (#4536689)
If container height is given by percentage you have to wrap it in another div with display: table. And if container is supposed to behave like inline-block you have to wrap it in yet another one. If you need to sprinkle around some margins and paddings (esp. with percentage height) you have to choose boilerplate divs to apply them to carefully.

Btw. your approach is exactly same that we had 10 years ago but with CSS table behavior faking rather than table tag.

Yay. Progress.

Re:iPhone 5 web teardown: How Apple compresses video using J... by shawndumas on Monday September 17, 2012 @09:48AM (#4532522)
removing them matters...