Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Framework Basics Build a Website with Bootstrap Content Layout with Nested Grids

Grid nesting leaves more padding

When i nest grid, inside a row. the default padding is applied, for which i have to do something like

<div class="col-md-4" style="padding:0">

</div>

Is there any other way?

2 Answers

add padding:0; to the element row

this will eliminate the default value of padding... every browser has is own default values for elements.

That's why a lot of people use a so called reset css file. So they eliminated all default values.

Normalize.css https://necolas.github.io/normalize.css/

reset.css http://meyerweb.com/eric/tools/css/reset/

But in the course while he teaches bootstrap, i don't see him mentioning normalize or reset

I believe Bootstrap achieves normalizing with its own presets. I don't remember exactly, but you might be able to change the presets when setting up the custom Bootstrap.