Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    I am mainly posting this because of the friday boredom that has engulfed me, but I am sure you guys wont mind.

    When you are writing CSS declarations (lets say you want to set a width, a font size, a forecolor, a cursor and a border) what order do you put them in?

    I tend to go a-z, such as
    Code:
    elem
       {
          border: 1px dashed red;
          color: black;
          cursor: default;
          font-size: 1.0em;
          width: 50px;
       }
    I guess it does not really matter, but some elements can have a lot of declarations and so by scanning them I can quickly locate the property I am after.

    Thoughts?

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I group them by their general purpose: margin and padding, top/left/right/bottom, width/height, font attributes, etc.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Yeah I guess I am the same, I mean all the font attributes start with.. you guessed it, font- so they are grouped.

  5. #4
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    I tend to go in the same order for like items; background if any, size, position, further styles (borders, etc).
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com