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 How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Vane Aroki
Vane Aroki
4,693 Points

I didn't get the part of the "meta tag". Could anyone explain it to me please?.. thanks :)

.

2 Answers

Simon Duchaine
Simon Duchaine
14,441 Points

When you use the (meta name="viewport" content="width=device-width, initial-scale=1"), you're telling the browser what size actually is your viewport. In fact, you could use a fixed width like 800px. But, what you want to do for your site to adapt the media size, is to tell the browser that the viewport width is the size of the browser (width=device-width).

If you don't put the meta tag in your html, your website design will kind of squeeze into the viewport without replacing all your elements as declared in your css @media (width=).

I'm not sure if I explained it well...

Vane Aroki
Vane Aroki
4,693 Points

You explained perfectly, now I get it!... Thank you very much for your help :)

Earlier in the course he talked about how it's best to use "relative units" instead of exact. Percentages instead of exact pixels, so I assume this was one was kinda had to put two and two together with haha