Comment Comment by camerondaigle Good grief, if the element to be centered has a fixed height and width, then there's nothing to this. I've been using the negative margin method for years:http://jsfiddle.net/mBBJM/2155/Not that it's any less Stockholm-Syndrome-y than the linked article's solution, but still, I have no clue why this is on the front page of HN. parent camerondaigle 13 years ago
http://jsfiddle.net/mBBJM/2155/
Not that it's any less Stockholm-Syndrome-y than the linked article's solution, but still, I have no clue why this is on the front page of HN.