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

Questions regarding omega css grids

Hi there.

I was just curious as to why the omega was used in the css code and added into the divs. Example: ----- Html ------ <div class="grid_3 omega"> <img src="http://treehouse-code-samples.s3.amazonaws.com/WWIsland1/stage4/img/you-bake-me-blush.gif" alt="You Bake Me Blush"> </div>

----css ------

.omega{margin-right:0px;}

I understand that this is overriding something so it has set the margin right to 0. Could this be overriding the grid margin for right?

example:

.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 { margin: 0 2% 1% 0; float: left; display: block; }

If so, I don't seen any difference when I take the omega off.

4 Answers

Alexander Smith
Alexander Smith
2,769 Points

What happens is with the margin from added to the grids can make the last one fall to he next line(or block(I'm not sure how to explain it exactly :P)). To prevent this the margin is removed from the last(sometimes both) so it will fit inside the container.

An easier way to see it is to put a set of grids inside a grid(come frameworks account for this in the container but requires both an alpha and omega type class for when you used grids inside another grid block).

That kind of makes sense. Thanks for that. I will try and miss around with it and see what happens.

Would you use omega, if you were using the whole grid, i.e. the 12 grid? I have only seen it being used when grids are nested or alongside each other.

Alexander Smith
Alexander Smith
2,769 Points

It depends on the specific grid system.