What really grates is that the same people will then often use a <ul> to make a hover menu, which is completely hypocritical.
Accessibility anyone?
-- <table width="80%"><!-- dynamic --><tr>
-- <td width="300">fixed"</td>
-- <td width="*">dynamic</td>
-- </tr><table>
Actually, it can. I did it for you:
.container {width: 80%;} .left {float:left; width: 300px; background: yellow;} .right {margin-left: 300px; background: red;}
.thing {
position: relative;
}
.thing .child {
width: 50px;
height: 50px;
position: absolute;
top: 50%;
margin-top: -25px; /* half of height */
}
Or else if it's text I just make the line-height the same height as the parent element. That keeps things vertically centred :)http://css-tricks.com/centering-in-the-unknown/
Not terrible but still a hack. Should just be a simple way of doing this by now... Still, this technique is better than a spacer gif!
CSS is perfectly fine for fixed size layouts but it completely sucks for dynamic ones, especially if you want to mix fixed and dynamic elements. Tables OTOH handle these layout scenarios simply, concisely and without hacks.
CSS is really botched and holding us back at this point. Fortunately it is slowly improving (eg. * { box-sizing: border-box } and the flex-box), but still...
False, dynamic vertical centering has always been possible with tables:
This is something CSS still can't seem to do dynamically except with table-emulation, which, you know, kind of defeats the whole fucking purpose of CSS (and isn't backwards compatible anyway). Seeing how much people decry tables as the antizalgochrist (guess what zealots: layout divs and lists also aren't semantic) I'm surprised this hasn't been fixed yet. But I don't care anymore since I moved back to app dev and my life got 100x less painful.Here's something else CSS still can't do AFAIK: