by aderra Banned
9 replies
  • |
Is there a prescribed order for CSS attributes, or does it matter? It seems logical to start with the common elements such as font type, size, and color. That's usually what I do, and I add anything else I use in random order. Should I be doing it differently?
#attributes #css
  • Profile picture of the author ronc0011
    As far as I know there isn't any prescribed order except maybe for things like the pseudo classes for your <a> tag like "link, visited, hover, active". Beyond that I generally order things according to their hierarchy in the site or document i.e. wrapper, header, menu, lefttColumn, mainContent, rightColumn, footer. And from there things like h1, h2, p, ul etc. etc.
    {{ DiscussionBoard.errors[5689840].message }}
  • Profile picture of the author frenchsquared
    I am not aware of any rules.
    I like the common stuff like basics, header, footer near the top
    and less used stuff like page specific tweeks at the bottom.

    The order you apply does not matter. As long as you know
    the later stuff will trump the earlier stuff.

    I am a php developer and Wordpress Guru. I was the original coder of Socrates and Metamorphosis. Be on the look out for my NEXT Theme... hopefully you will find it launched as a WSO in the next month or so. Optin for Special Pricing

    Need some help with Wordpress? find me on fiverr

    {{ DiscussionBoard.errors[5690137].message }}
    • Profile picture of the author IMBotz
      I don't think there is any standard for that.
      {{ DiscussionBoard.errors[5692073].message }}
  • Profile picture of the author webpeon
    yeah ive never come across any standards, whatever seems logical for yourself really
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5692768].message }}
  • {{ DiscussionBoard.errors[5693305].message }}
  • Profile picture of the author K Meier
    W3C has not defined any specific order for CSS. Why should there be an order anyways? It would just make it unnecessary complicated.
    {{ DiscussionBoard.errors[5695672].message }}
  • Profile picture of the author herrald
    we should do with a concept that is neat and orderly, it is very important in optimizing future resource
    {{ DiscussionBoard.errors[5699815].message }}
  • Profile picture of the author Walter Warner
    I guess there aren't any real rules to follow. Someone already mentioned this and that is to do what feels comfortable for you. I like organization and order therefore my rules will follow a certain logic, but that is just me.
    {{ DiscussionBoard.errors[5716219].message }}

Trending Topics