Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts

    Exclamation margin shorthand - how?

    The validator does not like this. It refers to the shorthand version. How else should I put it?

    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0 auto;
    margin-bottom:5%;
    }
    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #2
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Hi Frank,

    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0px auto;
    margin-bottom:5%;
    }
    Or you could do this:
    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0px auto 5% auto;
    }
    Drew
    Dev-Tips.com || Employee at the Envato Network || My Portfolio

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by FWDrew View Post
    Hi Frank,

    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0px auto;
    margin-bottom:5%;
    }
    Or you could do this:
    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0px auto 5% auto;
    }
    Drew
    Ah! So that's what they meant.

    Many thanks.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Quote Originally Posted by FWDrew View Post
    Code:
    #section{
    width:66%;
    background:#dd0;
    margin:0px auto 5% auto;
    }
    You could even make it shorter:
    Code:
    margin: 0 auto 5%;
    Three values apply to:
    1. top margin
    2. left and right margin altogether
    3. bottom margin

  • #5
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by VIPStephan View Post
    You could even make it shorter:
    Code:
    margin: 0 auto 5%;
    Three values apply to:
    1. top margin
    2. left and right margin altogether
    3. bottom margin
    That's real cool.

    I'll implement that.

    Thanks,

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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