Grow your CSS skills. Land your dream job.

[Solved] Whats the difference on this CSS?

  • # March 12, 2010 at 7:52 am

    Hi everyone! I have a simple question. Can someone explain the difference between these two style sheets?

    In every theme in wordpress i have found this structure:
    [img]http://files.droplr.com/files/60101112/AdOcr.yes.jpg[/img]

    but in this theme wordpress, i found this structure:
    [img]http://files.droplr.com/files/60101112/AdP4N.no.jpg[/img]

    Rob
    # March 12, 2010 at 10:05 am

    its just personal preference really

    I like the top way of writing it, because its more readable :)

    # March 12, 2010 at 10:16 am

    Thanks, but I think that the second method is less effective, right?

    # March 12, 2010 at 10:45 am

    Nope, simply just personal preference.

    Some people even do a combination of the two (grouping like-objects on a single line):

    Code:
    .class {
    width: 123px; height: 123px;
    margin: 0; padding: 0 12px 0 0;
    background: url(image.jpg) no-repeat; color: #ffffff;

    At the end of the day, it’s personal preference, in my opinion.

    # March 12, 2010 at 10:57 am

    Ok! Many thanks for the answer! :)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".