Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Proper Usage of Semicolons

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23499
    mikes
    Member

    I’ve always been under the impression that every css statement should end in a semicolon. However, many people use semi-colons simply as separators between two css statements. Which is the industry standard?

    I would do it like this:

    .myMethod { color: #8080ff; font-size: 14px; }

    but I’ve seen it like this

    .anotherMethod { color: #8080ff; font-size: 14px }

    Both seem to work in IE and FF. Does either cause a problem in any other browser?

    I prefer my method; it seems cleaner somehow. But I’d like to know which is "proper" technique.

    Edit: I realized what it is about the second method that bothers me… It’s like reading a book where the last sentence in every paragraph is missing a period. :)

Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.