Hacker News new | past | comments | ask | show | jobs | submit login

I want to downvote you but I'll reply instead: I've noticed this sort of response on HN more lately, where someone is criticized for the way they did a thing, or their approach in solving a problem, but the criticism is completely unhelpful.

patio11 clearly said in his blog post that CSS wasn't his bailiwick. Instead of simply saying, "You did it wrong!", you might say:

Here's a link to some popular CSS image replacement techniques: http://css-tricks.com/css-image-replacement/

It's also worth pointing out that, in that article, patio11's text-indent hack is cited as probably the most-commonly-used method.




Let's not be excessively gentle here: text-indent -1000 is a terrible hack (try input type="img" instead) and while I'm not mean enough to think the author deserved what he got, I also don't think we should feel overly sorry for him learning about how HTML works the hard way.

If you've been at it for a few (and I do mean "a few") years, building sites that work in all major browsers (FF, IE 6 - 8, well, alright, Safari) turns out to be not the most difficult thing in the world.


To add to this: The reason the text-indent trick is used was normally for header replacement, navigation replacement, et cetera, and was a method of providing strong naming that didn't clutter markup and fed screen readers or CSS disabled browsers.

Also to expand on it a little more, I use(ed) this trick a lot, and I've never had the image shifted off the page. I'd be interested to see the HTML that actually broke.


Fair enough, I was quick to respond.

I didn't mean to comment directly to the author but make a general statement of the current state of the art in CSS: to achieve an effect use the craziest hacks one can find. As you said, patio probably just found that code on the web and used it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: