Around, I think, November 2012, I asked a question akin to "What are the most important CSS gotchas?" Obviously, not a good match for SO. TL; DR - can someone with the appropriate rep please pastebin or screenshot me that answer? Ideally, I'd like to consider leaving the question closed, rather than deleted, if moderators find that the answer does indeed provide more value than one can find after a web search.

The answer that I wrote for that question got better than anything else on the web over time, and I've referred a number of CSS newbies to that answer. So, clear utility. I had often referred to that answer myself in the following weeks.

Today I was looking for that answer to pass it along to a fellow CSS coder, but I couldn't find it. I spentwasted about an hour already going through my questions, my answers, my edit history, thinking maybe I misremembered the title or something. I Googled for it in hope of some synonym matches. I looked at other SO questions I rememebered I had linked to from my answer, in hope of finding a backlink.

But - nothing. My question and answer had been removed with surgical precision, without any trace, and without any notification. That's just not cool. I had created useful content, which brought SE page views, and after an unspecified period, that knowledge was wiped out and I didn't even get a courtesy copy.

So I went on meta and spent another half hour looking at deletion policies and at Jeff's insensitive reply on the topic of users being able to see their own deleted questions and answers.

That feature request was filed in 2009, and was denied, which enraged the vast majority o the community. I personally find the practice of silent deletion despicable, but I guess it's beating a dead horse to try and fix it.

So I'd like to kindly ask to have my answer sent to me in some fashion, as @The-Establishment did in this question.

  • 1
    have you got link of that question ? if you have i(>10k) can give you image else only mod can help you Mar 21, 2013 at 7:51
  • 1
    You should blog the answer once you get it; sounds like it might be helpful to a bunch of people.
    – user200500
    Mar 21, 2013 at 7:53
  • 1
    Googling "What are the top CSS gotchas?" brings back this from one of the scraper sites 9nit.com/css/what-are-the-top-css-gotchas-closed--54262.html Mar 21, 2013 at 7:57
  • @NullPonyPointer - They link back to the stackoverflow original via the "Check more discussion of this question." Mar 21, 2013 at 8:01
  • in case you want to see original post i.stack.imgur.com/5UO1y.png Mar 21, 2013 at 8:04
  • @NullPonyPointer: thanks for the screenshot but why in the world did you vote to delete my question? Mar 21, 2013 at 8:42
  • @Asad: Glad to see you realize the answer might be useful. If only the beep who deleted my question had a bit of vision as well. Mar 21, 2013 at 8:44
  • In future, if you want moderators to see a note, you put it in a flag, not in the question body. That's the only way you can ensure that it reaches us directly. Mar 21, 2013 at 8:54
  • @mog: Since you originally deleted this question, you may also want to delete What CSS tips should every beginning developer know about?. Bolt: I'll make sure to do that in the future. Mar 21, 2013 at 9:22

1 Answer 1


Here you go (link)

  1. Browsers ship with different default styles. Use a CSS normalization library for a clear, defined slate.

  2. Always set <!doctype html>. Otherwise, your HTML may be rendered in Quirks Mode, with side effects like tables not inheriting the font from the body element.

  3. Even then, the col and colgroup table elements are pretty useless. You can't set the color, for example.

  4. You also can't quite set the height of a table.

  5. tr elements don't take style unless you set table {border-collapse: collapse;}

  6. You can't set margins for table cells.

  7. Form controls don't inherit the font from the body. Instead, they're by default styled similarly to the look&feel of the OS.

  8. Adjoining vertical margins collapse, while horizontal margins never collapse.

  9. top,right,left and bottom values on an absolutely positioned element will be relative to the closest positioned ancestor. An element is considered "positioned" if it has a position other than static (default).

  10. Dimensioned boxes (width is specified) expand to occupy more horizontal space as padding, borders and margins are added. Effectively, the width property sets the width of the box's content, not the box itself, when the box's width is stated. Undimensioned boxes (no width set) will always expand to fill the width of their containing element. Because of this, adding margins, borders and padding to an undimensioned element does cause the content to change width.

    -- Charles Wyke-Smith, Stylin' with CSS

  11. "a parent element that only contains floated items will have a zero height"

  12. Specificity, "[t]he different weight of selectors[,] is usually the reason why your CSS-rules don’t apply to some elements, although you think they should have."

  • 1
    just curious how did you found that post ? i mean is it {1k}k power ? Mar 21, 2013 at 8:05
  • 4
    @NullPonyPointer - I googled site:stackoverflow.com Dan Dascalescu css gotcha and was able to see the proper title then googled "What are the top CSS gotchas?" which took me to the scraper site which linked back to the SO post. Mar 21, 2013 at 8:06
  • @Asad - The markdown is just copied and pasted into my answer as well so they can just get it via clicking "edit" Mar 21, 2013 at 8:09
  • @MartinSmith I see that now; I brainfarted and didn't read the rest of the answer, so I assumed those were pointers on how to improve the question/answer. Sorry.
    – user200500
    Mar 21, 2013 at 8:13

Not the answer you're looking for? Browse other questions tagged .