1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ugly margin in the example page

Discussion in 'XenForo Pre-Sales Questions' started by Puntocom, Nov 22, 2010.

  1. Puntocom

    Puntocom Well-Known Member

  2. Brogan

    Brogan XenForo Moderator Staff Member

    I've moved this to feedback as it's not a bug with the software but just some dodgy HTML on a Page ;)
    Puntocom likes this.
  3. CyberAP

    CyberAP Well-Known Member

    It is the padding problem, not the margin one.
  4. Jaxel

    Jaxel Well-Known Member

    Well technically it can be fixed with padding or margin...

    In this specific case, I would fix it with margin, not padding. Padding is used for inside of a div. Margin is used for outside of a div. In this case, you want to have a margin outside of the division that holds the image. Yes, this can be done just as easy with padding, but for semantics, you're looking for margin.

    I personally try to use margin as much as possible and only resort to padding when the area I need shifted is within the content div. The major difference is that margins collapse, while padding does not. If you have two DIVs, side by side, both with padding of 10, where the two DIVs meet in the middle will have a combined space between of 20. If you do it with margin instead, it would collapse the margin and end up with a combined space between of only 10.
  5. Kier

    Kier XenForo Developer Staff Member

    I thought margins only collapsed vertically?

    *goes to check
  6. ---MAD---

    ---MAD--- Well-Known Member

    Seems fine for me.. unless I am looking at the wrong thing..
  7. Brogan

    Brogan XenForo Moderator Staff Member

    I just checked the Google preview and it looks fine to me too.
  8. dutchbb

    dutchbb Well-Known Member

    My nickname in the Google XF serp, what an honour :D
    CyberAP likes this.

Share This Page