My question is: How can I get a 20px gutter in between the main content and sidebar? The main content is red, and the sidebar is blue. How do I get the gutter transparent to the body background? I want percentage widths so that it works responsively on mobile versions, etc.
Hi all,
I have simplified my code on CodePen: http://codepen.io/jordangrogan/pen/wCAng
My question is: How can I get a 20px gutter in between the main content and sidebar? The main content is red, and the sidebar is blue. How do I get the gutter transparent to the body background? I want percentage widths so that it works responsively on mobile versions, etc.
Does this make sense?
Thanks!!
Add an inner wrap to the content and apply padding instead of margin
Because your main content and sidebar takes 100% of the space (75% + 25%), there is no space for gutter anymore. This will work:
@jordangro, Here is... another way to do that