Announcement

Collapse
No announcement yet.

CSS attributes-order?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS attributes-order?

    I've used cascading style sheets for quite some time, but have never seen anything about attribute order. Is there some recommended order in which attributes should be listed within a CSS file?

  • #2
    I've never paid attention to the order of CSS attributes because I didn't think it made any difference. You don't use them all anyway. I never do. If memory serves, there are about twenty different attributes you can apply to an element in CSS. I end up using about 5 or 6 for most of my elements.

    Comment


    • #3
      Believe it or not, there are over 100 CSS properties. Most are very obscure and rarely used. I've only taken advantage of about 15 of them myself, but normally have only a few for each style. But, no, I don't believe there's an industry standard for listing their order.

      Comment


      • #4
        That's surprising. I had no idea there were so many different CSS attributes. It's no wonder there doesn't seem to be any universally accepted protocol for how to list them.

        Comment


        • #5
          When I started using CSS, the tutorials would always differ on the order. It doesn't seem to matter, but it helps me to use the same order for every element and class. When you want to make a change, it's easier to scan your CSS file to find it.

          Comment

          Working...
          X