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 trialMelindy Richardson
Courses Plus Student 287 PointsGrid Syntax
I am new in web designing and learning it here. I got the idea of gridulator/ grid but my problem is how can i incorporate it in my design. I thought gridulator has a pre codes that you can just save based on the calculation of columns and width. Is their a syntax to follow to make your framework ? Please help.. thank you so much
Melindy Richardson
Courses Plus Student 287 PointsThanks for your response. i will try to do that and hopefully will be able to do it.
1 Answer
Connor Kuehl
4,393 PointsTypically grid systems come with predefined classes for you to incorporate into your markup in order to structure your website's layout.
For example, I used the One% responsive grid layout when making my website. So I downloaded and added their grid.css to the cascade of my website.
In One%, and many other grids, they use a system of columns to determine how many elements can sit in a row, hence "grid".
So my grid layout is comprised of 12 columns. So, for example, I want half of the row to display an image, and the other half to display text. Therefore:
<div class="col6">My image would go here. This would go on the left half of the page.</div>
<div class="col6 last">My text would go here. This would be on the right half of the page.</div>
You'll notice I added the class "last" to my second div element. That means it will be the LAST element in that row, therefore it removes the margins so everything fits nicely.
In the building a basic website module here on treehouse, they used a grid, except instead of "last" they used "omega".
It's a good idea to go over the CSS for your grid to learn the styles. It's simple math, but not all styles use the same classes, for example instead of "col1" or "col2", yours might be "grid_1" or "grid_6".
Melindy Richardson
Courses Plus Student 287 PointsThank you for your reply. I am learning that now and your advise is good.
Shivam Bhalla
Courses Plus Student 5,035 PointsShivam Bhalla
Courses Plus Student 5,035 PointsWhy don't you write the CSS yourself for your custom based design?