www.webdeveloper.com
Results 1 to 4 of 4

Thread: does it matter what order margin tags are in?

  1. #1
    Join Date
    Sep 2005
    Posts
    24

    does it matter what order margin tags are in?

    in css when you're noting margins,

    {margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; }

    is there a specific order they have to go in (like links)?
    omg omg web design on a mac

  2. #2
    Join Date
    Oct 2005
    Posts
    128
    no there is no special order, but you could make your life easier by doing it shorter, since they are all 0

    margin: 0;

    if they weren't all zero you could still do 1 line

    margin: 1px 2px 1px 2px;

    margin: top right bottom left;
    TEGraphix

  3. #3
    Join Date
    Sep 2005
    Posts
    24
    Quote Originally Posted by tegraphix
    margin: 1px 2px 1px 2px;
    yeah, i should switch to that.

    thanks!
    omg omg web design on a mac

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,430
    And even more shorthand stuff:
    Code:
    margin: 5px 10px; /* top and bottom = 5px, left and right = 10px */
    margin: 5px 10px 15px; /* top = 5px, left and right = 10px, bottom = 15px */
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles