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

Is it still useful to use positioning with grids ?

I wad just wondering that if your using 960 grid or any other grid framework do you still need to set the positioning of each element or is there no point using this because the grid already positions elements ?

4 Answers

Samuel Johnson
Samuel Johnson
9,152 Points

Grids are very useful for positioning elements around the screen and something like skeleton makes it easy to sort elements for responsive design.

When you say positioning i assume you mean, Absolute/Fixed/Relative etc? to be honest i wouldnt even use that to position elements even without a grid. The main advantages of using Absolute is when you have elements hovering over each other or sticking to position even when you scroll down the page.

Relative is the default which keeps all the elements in the position they are placed, Absolute will allow elements to disrupt that relative flow but still stay in position even when you scroll and fixed elements stay in that position even when you scroll (this can be useful when you have a menu bar that stays in the same place all the way down the page!)

James Barnett
James Barnett
39,199 Points

> Relative is the default which keeps all the elements in the position they are placed

No, static is the default. Check out http://learnlayout.com/position.html to see the difference

Samuel Johnson
Samuel Johnson
9,152 Points

My mistake, didnt mean to mis informed.

No idea why i said that when i realise its static...

Thanks!

Samuel Johnson
Samuel Johnson
9,152 Points

My mistake, i didnt mean to misinform!

Thanks for clearing that up!

Jennifer Hinkle
Jennifer Hinkle
8,365 Points

In the middle of typing an answer, Samuel's appeared, and it's pretty much exactly what I was going to say. So I agree!

Also, check out the Build a Simple Website. Under Creating a Website Structure there are a couple videos about grids (quite basic). But pretty helpful for getting started.

I agree too. I'm new to Web Design and while prototyping few websites, I was so happy that I learned about grids from Treehouse. There are many templates and/or frameworks that you can use if you need adaptive/fluid/responsive grids on the web. It sure isn't semantically correct to use grids, but is the fastest way to deliver nice designs. If you're concerned about this, you can use SASS or LESS. For more information about latter try searching for Semantic grid on smashing magazine.com.

I hope I helped a bit.

Grids are useful for set the elements of the page at the right place.Once you make you final vesion of the layout, using positioning is up to you, or the needs of the project...sometimes you won't have to use them...sometimes you'll....but the both together are great tools to construct websites :) I hope it helps