Margin between columns without defining first/last


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. .column + .column { margin-left: 30px; }
  2.  
  3.  
  4. // (just to clarify, the html:)
  5. // <div class="column">...</div>
  6. // <div class="column">...</div>
  7. // <div class="column">...</div>
  8.  
  9. // it gives the second one and the third one a margin on the left of 30px

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.