Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Enhancing Design with CSS Finishing Touches Applying Media Queries

Stephen Cole
Stephen Cole
Courses Plus Student 13,350 Points

Instead of calc() why not just shrink the column width to 45%?

In the video, we're taught to do the calculation. However, I made the column width 45% and it look just fine.

Is there a benefit to using calc() instead just making the columns slightly more narrow?

1 Answer

Steven Parker
Steven Parker
216,879 Points

Calculating the margin insures efficient use of all the available space. Using a smaller width will appear very similar in typical sizes, but will make the column smaller than it needs to be in very large sizes and/or too large when the window size is very small.