Quick question about CSS

I have a quick question about CSS.

If you have a class with a list like the one below, does it matter what the order of the list is? Is there a specific way these elements of the class need to be ordered or does it not matter? Thanks so much in advance for the answer.

~ Elmo

.guarantee {

        line-height: 1.9em;
        font-style: italic;
        font-family: Georgia, "Times New Roman", Times, serif;
        color: #444444
        border-color:  black;
        border-width: 1px;
        border-style: solid;
        background-color: #a7cece;
        padding: 25px;
        margin: 30px;
        background-image: url(images/background.gif);

No I don’t think it does, I’ve wonder this myself. I do however when writing my code try and put things in a common order that is obviously unique to me.

No, it doesn’t. However, it’s a lot easier to find what you’re looking for if it’s in order (either in alphabetical order or certain properties grouped together).

Almost forgot to mention, if you have the same property more than once, the last one overwrites the previous ones. So an element with the following properties:

.el {
  border: 1px solid #444;
  cursor: pointer;
  margin: 0 1em;
  padding: .5em 1em;
  border-width: 2px;
}

… will have 2px solid #444 borders.

Talking of overwriting,@zsoltime doesn’t an inline style sheet overwrite the standard sheet?

Oh yeah, them little bastards override rules in the CSS, unless you use the !important keyword :slight_smile:

It does. The rule for overwriting(cascade) is covered in the fcc css curriculum

Thanks so much Zsoltime, Peyton, and Simeon!

I really appreciate the help and time you all took to answer my question. If I can ever do to repay the favor, don’t hesitate to ask.

God Bless!

Mark Elmo Ellis