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

XF 1.2 Background CSS

Discussion in 'Styling and Customization Questions' started by Amaury, Jan 31, 2014.

  1. Amaury

    Amaury Well-Known Member

    Sometimes I see background-color: red; sometimes I see background: red. However, they both work and take care of the same thing, so is there a noticeable different between the two?

    I should add that I've always used just background.
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Amaury

    Amaury Well-Known Member

  4. Amaury

    Amaury Well-Known Member

    @Brogan, so is it the same case when it comes to border: red vs. border-color: red?
  5. katsulynx

    katsulynx Well-Known Member

    It is the same with all those things. Basically Border, Background, etc. are just summaries of the different subproperties. So border consists out of border-color, border-bottom/left/right/top, border-style and many more, where as the different borders (top, etc) are also just summaries of their subproperties. You can but don't have to fill in every single attribute of that propertie, that is basically the use of those things. Normally it is not required to use such things, only when it comes to specific things like margin-bottom, even though you could set "margin: top right left bottom;" or margin: "top&bottom left&right".
    Amaury likes this.

Share This Page