title: Padding in responsive email design
body: <p>I can't seem to find a definitive answer to my query and especially as this is all a new field to me, finding it a little tricky but i'm almost there :)</p>
  
  <p>I am basically trying to add a padding style to the social icons at the top of th email so that when the browser is resized, (essentially looked at on a smartphone) there is sufficient space between each icon. </p>
  
  <p>When the screen is at full size it has equal spacing more so because the columns it sits in are loosely defined. It would be great to not have to cheat and use one image but rather the spacing kicks into effect as the screen decreases past breakpoints.</p>
  
  <p>Code is below:</p>
  
  <pre><code>   &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;!-- If you delete this tag, the sky will fall on your head --&gt;
  &lt;meta name="viewport" content="width=device-width" /&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;title&gt;ZURBemails&lt;/title&gt;
  &lt;link href="stylesheets/email2.css" rel="stylesheet" type="text/css" /&gt;
  &lt;style&gt;
  @charset "UTF-8";
  /* CSS Document */
  
  /* ------------------------------------- 
          GLOBAL 
  ------------------------------------- */
  * { 
      margin:0;
      padding:0;
  }
  * { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; }
  
  img { 
      max-width: 100%; 
  }
  .collapse {
      margin:0;
      padding:0;
  }
  body {
      -webkit-font-smoothing:antialiased; 
      -webkit-text-size-adjust:none; 
      width: 100%!important; 
      height: 100%;
  }
  
  
  /* ------------------------------------- 
          ELEMENTS 
  ------------------------------------- */
  a { color: #2BA6CB;}
  
  .btn {
      text-decoration:none;
      color: #FFF;
      background-color: #666;
      padding:10px 16px;
      font-weight:bold;
      margin-right:10px;
      text-align:center;
      cursor:pointer;
      display: inline-block;
  }
  
  p.callout {
      padding:15px;
      background-color:#ECF8FF;
      margin-bottom: 15px;
  }
  .callout a {
      font-weight:bold;
      color: #2BA6CB;
  }
  
  p.subtext {
      padding:0 15px;
      margin-bottom: 15px;
  }
  .subtext a {
      font-weight:bold;
      color: #2BA6CB;
  }
  
  table.social {
  /*  padding:15px; */
      background-color: #ebebeb;
  
  }
  .social .soc-btn {
      padding: 3px 7px;
      font-size:12px;
      margin-bottom:10px;
      text-decoration:none;
      color: #FFF;font-weight:bold;
      display:block;
      text-align:center;
  }
  a.fb { background-color: #3B5998!important; }
  a.tw { background-color: #1daced!important; }
  a.gp { background-color: #DB4A39!important; }
  a.ms { background-color: #000!important; }
  
  .body-wrap tr .container .content .nav {
      text-align: center; 
      color:#696969;
      margin-top:-10px;
      margin-bottom:5px;
      line-height:1.5;
  }
  .body-wrap tr .container .content .nav a {
      text-decoration:none;   
      color:#696969;
  }
  
  
  .sidebar .soc-btn { 
      display:block;
      width:100%;
  }
  
  p.topNote { border-top: 4px solid #1b3281; margin-top:-2px;}
  
  
  /* ------------------------------------- 
          HEADER 
  ------------------------------------- */
  table.head-wrap { width: 100%;}
  
  .header.container table td.logo { padding: 15px; }
  .header.container table td.label { padding: 15px; padding-left:0px;}
  
  
  /* ------------------------------------- 
          BODY 
  ------------------------------------- */
  table.body-wrap { width: 100%;}
  
  
  /* ------------------------------------- 
          FOOTER 
  ------------------------------------- */
  table.footer-wrap { width: 100%;    clear:both!important;
  }
  .footer-wrap .container td.content  p { border-top: 1px solid rgb(215,215,215); padding-top:15px;}
  .footer-wrap .container td.content p {
      font-size:10px;
      font-weight: bold;
  
  }
  
  
  /* ------------------------------------- 
          TYPOGRAPHY 
  ------------------------------------- */
  h1,h2,h3,h4,h5,h6 {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; line-height: 1.1; margin-bottom:15px; color:#000;
  }
  h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; text-transform: none; }
  
  h1 { font-weight:bold; font-size: 27px; color:#1b3180;}
  h2 { font-weight:bold; font-size: 22px; color:#1b3180;}
  h3 { font-weight:900; font-size: 22px; color:#0166b1;}
  h4 { font-weight:500; font-size: 20px; color:#0166b1;}
  h5 { font-weight:900; font-size: 17px;}
  h6 { font-weight:900; font-size: 14px; text-transform: uppercase; color:#444;}
  
  .collapse { margin:0!important;}
  
  p, ul { 
      margin-bottom: 10px; 
      font-weight: normal; 
      font-size:14px; 
      line-height:1.6;
  }
  p.lead { font-size:17px; }
  p.last { margin-bottom:0px;}
  
  ul li {
      margin-left:5px;
      list-style-position: inside;
  }
  
  /* ------------------------------------- 
          SIDEBAR 
  ------------------------------------- */
  ul.sidebar {
      background:#ebebeb;
      display:block;
      list-style-type: none;
  }
  ul.sidebar li { display: block; margin:0;}
  ul.sidebar li a {
      text-decoration:none;
      color: #666;
      padding:10px 16px;
  /*  font-weight:bold; */
      margin-right:10px;
  /*  text-align:center; */
      cursor:pointer;
      border-bottom: 1px solid #777777;
      border-top: 1px solid #FFFFFF;
      display:block;
      margin:0;
  }
  ul.sidebar li a.last { border-bottom-width:0px;}
  ul.sidebar li a h1,ul.sidebar li a h2,ul.sidebar li a h3,ul.sidebar li a h4,ul.sidebar li a h5,ul.sidebar li a h6,ul.sidebar li a p { margin-bottom:0!important;}
  
  
  
  /* --------------------------------------------------- 
          RESPONSIVENESS
          Nuke it from orbit. It's the only way to be sure. 
  ------------------------------------------------------ */
  
  /* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
  .container {
      display:block!important;
      max-width:640px!important;
      margin:0 auto!important; /* makes it centered */
      clear:both!important;
  }
  
  /* This should also be a block element, so that it will fill 100% of the .container */
  .content {
      padding:15px;
      max-width:600px;
      margin:0 auto;
      display:block; 
  }
  
  /* Let's make sure tables in the content area are 100% wide */
  .content table { width: 100%; }
  
  
  /* Odds and ends */
  .column {
      width: 300px;
      float:left;
  }
  .column tr td { padding: 15px; }
  .column-wrap { 
      padding:0!important; 
      margin:0 auto; 
      max-width:600px!important;
  }
  .column table { width:100%;}
  .social .column {
      width: 280px;
      min-width: 279px;
      float:left;
  }
  
  /* Be sure to place a .clear element after each set of columns, just to be safe */
  .clear { display: block; clear: both; }
  
  .double .column {
      width: 280px;
      min-width: 279px;
      float:left;
  }
  
  .socialicons { padding-left:3px; }
  
  
  /* ------------------------------------------- 
          PHONE
          For clients that support media queries.
          Nothing fancy. 
  -------------------------------------------- */
  @media only screen and (max-width: 600px) {
  
      a[class="btn"] { display:block!important; margin-bottom:10px!important; background-image:none!important; margin-right:0!important;}
  
      div[class="column"] { width: auto!important; float:none!important;}
  
      table.social div[class="column"] {
          width:auto!important;
      }
  
      /* flex the hero image */
  .container img {  width:100% !important; }
  
  
  }
  
  
  
  
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body bgcolor="#ececec"&gt;
  
  &lt;!-- HEADER --&gt;
  &lt;table class="head-wrap" bgcolor="#ffffff" width="100%"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td class="header container"&gt;
  
                  &lt;div class="content"&gt;
                    &lt;table bgcolor="#ffffff"&gt;
                      &lt;tr&gt;
                          &lt;td height="42" style=" padding-right:10px;"&gt;
                          &lt;img src="http://placehold.it/500x26"&gt;&lt;/td&gt;
                          &lt;td rowspan="4" align="right"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/atol.jpg"/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td style="color: #CCCCCC;"&gt;&lt;img src="http://placehold.it/265x20"&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td style="color: #CCCCCC;"&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td style="color: #CCCCCC;"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
                        &lt;tr&gt;
                              &lt;td width="31%"&gt;&amp;nbsp;&lt;/td&gt;
                              &lt;td width="30%"&gt;&lt;table width="100%" border="0" cellspacing="0" cellpadding="0" align="right"&gt;
                                &lt;tr&gt;
                        &lt;td style="color: #CCCCCC;"&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;/tr&gt;
                              &lt;/table&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                        &lt;/table&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/table&gt;
                      &lt;table width="100%" border="0" cellpadding="0" cellspacing="0" class="socialicons"&gt;
                        &lt;tr&gt;
                          &lt;td width="51%"&gt;&amp;nbsp;&lt;/td&gt;
                          &lt;td width="13%"&gt;&amp;nbsp;&lt;/td&gt;
                          &lt;td width="8%"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/FB.png" alt="Facebook icon" width="24" height="23" border="0" class="socialicons"/&gt;&lt;/td&gt;
                          &lt;td width="7%"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/twit.png" border="0" width="24" height="23" alt="Facebook icon" /&gt;&lt;/td&gt;
                          &lt;td width="7%"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/youtube.png" border="0" width="24" height="23" alt="Facebook icon" /&gt;&lt;/td&gt;
                          &lt;td width="8%"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/flickr.png" border="0" width="24" height="23" alt="Facebook icon" /&gt;&lt;/td&gt;
                          &lt;td width="6%"&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/gplus.png" border="0" width="24" height="23" alt="Facebook icon" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                  &lt;/div&gt;
  
  
  
  
    &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;&lt;!-- /HEADER --&gt;
  
  
  &lt;!-- BODY --&gt;
  &lt;table class="body-wrap"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td class="container" bgcolor="#FFFFFF"&gt;
  
              &lt;div class="content"&gt;
                   &lt;table class="nav" width="100%"&gt;
                              &lt;tr&gt;
                                &lt;td class="container" bgcolor="#FFFFFF"&gt;&amp;nbsp;&amp;nbsp; 
  &lt;a href="http://www.google.co.uk/ski-resorts/austria-ski-holidays/?em=cs080213" target="_blank"&gt;Austria&lt;/a&gt;&amp;nbsp; &amp;#124; 
  &lt;a href="http://www.google.co.uk/ski-resorts/france-ski-holidays/?em=cs080213" target="_blank" &gt;France&lt;/a&gt;&amp;nbsp; &amp;#124;
  &lt;a href="http://www.google.co.uk/ski-resorts/italy-ski-holidays/?em=cs080213" target="_blank" &gt; Italy&lt;/a&gt;&amp;nbsp; &amp;#124; 
  &lt;a href="http://www.google.co.uk/ski-resorts/switzerland-ski-holidays/?em=cs080213" target="_blank" &gt;Switzerland&lt;/a&gt;&amp;nbsp; &amp;#124;
  &lt;a href="http://www.google.co.uk/ski-resorts/canada-ski-holidays/?em=cs080213" target="_blank" &gt; Canada&lt;/a&gt;&amp;nbsp; &amp;#124;
  &lt;a href="http://www.google.co.uk/ski-resorts/usa-ski-holidays/?em=cs080213" target="_blank" &gt; USA&lt;/a&gt;&amp;nbsp; &amp;#124; 
  &lt;a href="http://www.google.co.uk/ski-resorts/ski-holidays/?em=cs080213" target="_blank"&gt; All Ski destinations&lt;/a&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                      &lt;!-- A Real Hero (and a real human being) --&gt;
                          &lt;p&gt;&lt;img src="http://www.google.co.uk/emails/Template2013/images/hero_image_template.jpg" /&gt;  
  
                         &lt;/p&gt;&lt;!-- /hero --&gt;
                        &lt;p class="topNote"&gt;&lt;/p&gt;
                        &lt;!-- Callout Panel --&gt;
                        &lt;h1&gt;Welcome Mr Smith,&lt;/h1&gt;
                          &lt;p class="callout"&gt;
                              Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
                           Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
                      &lt;/p&gt;
                          &lt;br /&gt;
                    &lt;h3&gt;Subheader 1&lt;/h3&gt;
  
                          &lt;p class="subtext"&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et.&lt;/p&gt;
                         &lt;table class="double" width="100%"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
  
                                      &lt;!--- column 1 --&gt;
                                    &lt;table align="center" class="column"&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;                
                                      &lt;p&gt;&lt;img src="http://placehold.it/280x150" /&gt;&lt;/p&gt;                                        
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                                    &lt;/table&gt;&lt;!-- /column 1 --&gt;    
  
                                      &lt;!--- column 2 --&gt;
                                      &lt;table align="left" class="column" bgcolor=""&gt;
                                          &lt;!--&lt;tr bgcolor="#1b3281"&gt;
                                              &lt;td&gt;                                
                                                  &lt;p style="color:#FFFFFF; font-weight:bold;"&gt;Delta Whistler Village, CANADA&lt;/p&gt;
                                              &lt;/td&gt;
                                        &lt;/tr&gt;--&gt;
                                          &lt;tr&gt;
                                            &lt;td&gt;
                                                            &lt;h4&gt;Delta Whistler Village&lt;/h4&gt;
  
                                            &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis autem vel eum iriure dolor in hendrerit in &lt;/p&gt;&lt;/td&gt;
                                        &lt;/tr&gt;                
                                    &lt;/table&gt;                                &lt;!-- /column 2 --&gt;
  
                                &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt; &lt;br /&gt;
                           &lt;table class="double" width="100%"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
  
                                      &lt;!--- column 1 --&gt;
                                    &lt;table align="center" class="column"&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;                
                                      &lt;p&gt;&lt;img src="http://placehold.it/280x150" /&gt;&lt;/p&gt;                                        
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                                    &lt;/table&gt;&lt;!-- /column 1 --&gt;    
  
                                      &lt;!--- column 2 --&gt;
                                      &lt;table align="left" class="column" bgcolor=""&gt;
                                          &lt;!--&lt;tr bgcolor="#1b3281"&gt;
                                              &lt;td&gt;                                
                                                  &lt;p style="color:#FFFFFF; font-weight:bold;"&gt;Delta Whistler Village, CANADA&lt;/p&gt;
                                              &lt;/td&gt;
                                        &lt;/tr&gt;--&gt;
                                          &lt;tr&gt;
                                            &lt;td&gt;
                                                            &lt;h4&gt;Delta Whistler Village&lt;/h4&gt;
  
                                            &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis autem vel eum iriure dolor in hendrerit in &lt;/p&gt;&lt;/td&gt;
                                        &lt;/tr&gt;                
                                    &lt;/table&gt;                                &lt;!-- /column 2 --&gt;
  
                                &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt; 
  
                          &lt;!-- A Real Hero (and a real human being) --&gt;
                          &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;!-- /hero --&gt;
  
                      &lt;!-- Callout Panel --&gt;
                          &lt;p class="callout"&gt;
                              Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt. &lt;a href="#"&gt;Do it Now! &amp;raquo;&lt;/a&gt;
                          &lt;/p&gt;&lt;!-- /Callout Panel --&gt;
  
                          &lt;h3&gt;Title Ipsum &lt;small&gt;This is a note.&lt;/small&gt;&lt;/h3&gt;
                          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
                          &lt;a class="btn"&gt;Click Me!&lt;/a&gt;
  
                          &lt;br/&gt;
                          &lt;br/&gt;                           
  
                          &lt;!-- social &amp; contact --&gt;
                          &lt;table class="social" width="100%"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
  
                                      &lt;!--- column 1 --&gt;
                                      &lt;table align="left" class="column"&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;                
  
                                                  &lt;h5 class=""&gt;Connect with Us:&lt;/h5&gt;
                                                  &lt;p class=""&gt;&lt;a href="#" class="soc-btn fb"&gt;Facebook&lt;/a&gt; &lt;a href="#" class="soc-btn tw"&gt;Twitter&lt;/a&gt; &lt;a href="#" class="soc-btn gp"&gt;Google+&lt;/a&gt;&lt;/p&gt;
  
  
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                                      &lt;/table&gt;&lt;!-- /column 1 --&gt;  
  
                                      &lt;!--- column 2 --&gt;
                                      &lt;table align="left" class="column"&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;                
  
                                                  &lt;h5 class=""&gt;Contact Info:&lt;/h5&gt;                                             
                                                  &lt;p&gt;Phone: &lt;strong&gt;408.341.0600&lt;/strong&gt;&lt;br/&gt;
                  Email: &lt;strong&gt;&lt;a href="emailto:hseldon@trantor.com"&gt;hseldon@trantor.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                                      &lt;/table&gt;&lt;!-- /column 2 --&gt;
  
                                      &lt;span class="clear"&gt;&lt;/span&gt; 
  
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;&lt;!-- /social &amp; contact --&gt;
  
  
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
              &lt;/div&gt;
  
          &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;&lt;!-- /BODY --&gt;
  
  &lt;!-- FOOTER --&gt;
  &lt;table class="footer-wrap"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td class="container"&gt;
  
                  &lt;!-- content --&gt;
                  &lt;div class="content"&gt;
                  &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td align="center"&gt;
                          &lt;p&gt;
                              &lt;a href="#"&gt;Terms&lt;/a&gt; |
                              &lt;a href="#"&gt;Privacy&lt;/a&gt; |
                              &lt;a href="#"&gt;&lt;unsubscribe&gt;Unsubscribe&lt;/unsubscribe&gt;&lt;/a&gt;
                          &lt;/p&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
                  &lt;/div&gt;&lt;!-- /content --&gt;
  
          &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;&lt;!-- /FOOTER --&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am open to differing suggestions also.</p>
  
  <p>Thank you.</p>