I love you, man. I really do. You're like a brother to me. But you and me and these web developers here need to sit down and have a little intervention with you.
I know that you've go a lot on your mind right now, but there's some things that we need to talk about with you, dude.
First I just want to say that I love your styles. That's not what we're here to talk about, but it's something I really wanted to give you some kudos for.
text-decoration, color, background, you are awesome. Those things are so good, I just wanna hug them, most of the time.
text-decoration and I have had our differences, but I've learned to work around them, and I'm pretty good now.
And the cascade? The cascade is pretty sweet.
But CSS...your positioning sucks. I know it, these web developers here know it, and it's something that we really need to talk about. It's been happening for a long time, and all of us here really would like you to think pretty hard about bringing some changes into your life.
It's not a big overhaul or anything. It's just a few things that we'd really love to see. There's just a few things. Everybody here really loves you man. We mean it. There's just a few small, little things that would really help make all of us happier, and maybe they're things that could help you feel better about yourself, too:
- All I want for Christmas is the ability to position a box relative to another box that is not the container. Like, say, something like:
position: relative-to #other_box top-right; top: 0; left: 0;, and then the top-left of my box would be aligned to the top-right of #other_box. Then I would never have to wrangle with
floatever again, except when I wanted to have some text spill around a box.
- Then while we're at it, I'd really love to be able to specify the size of a box (either horizontal or vertical) as being identical to another box. Maybe something like:
height: #other_box. Tables do this. They did it in 1996. Now it's 2010, and I think that this is something we all would love, but without the tables. So it's something for you to think about; it would really help us out.
- Since we're talking about height, it would also be awesome to have a way to say "this should be the height of its container but no larger". You'd think
height: 100%would do that, but no, that seems to make the box the height of its content, at least the last time I tried it (yesterday). That's OK, though, we love you even though you're eccentric, CSS. I think we just need a little something different, here.
- I can't say how much I'd love to be able to vertically center something in a box. Some of the less-informed members of this little sit-down here might think that
vertical-alignhas something to do with vertically aligning things in boxes. But no, no, it doesn't. It was a bit of a trick that CSS pulled on us, and we understand that there were some reasons, so we're annoyed, but understanding.
- While we're at it, wouldn't it be nice to have a single, simple way to center anything horizontally in its containing box?
margin: 0 autousually works. I mean, if you wrap the contents in a table so that they auto-size. (That's a whole other issue, though, possibly solved by
display: table?) Sometimes you have to use
text-align: center, though. That's fun, but not really what we meant. Then sometimes there's no way at all, which isn't so fun.
- If you felt really nice, letting me specify
z-indexon non-positioned elements and having it actually work would be really awesome. That's just if you feel like it, though. I know that there's a lot of other stuff to think about, here, and and I want you to take your own time to do it, and think about it for yourself.
Those are all the things that we'd need. I know that life is pretty difficult for you right now, what with CSS3, HTML5, quirks mode, standards mode, specs, working groups, modules, errata, and everything. So this isn't something I expect overnight. But it's time for us to say that there's millions of people that you're affecting, with your behavior, and we've given you so much love. Couldn't you just give us a little?