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

Gareth Redfern
Gareth Redfern
36,217 Points

Responsive Fixed Header

Does anyone know of a simple solution to create a fixed header that works on a responsive site where the header height will alter depending on the screen width?

3 Answers

If I am understanding your question you could just use media queries and change the height of your header at the various break points you set up.

Gareth Redfern
Gareth Redfern
36,217 Points

Thanks for the help on this guys I went with Shawn's suggestion. I don't think there is another simple way round it.

Shawn's way is the correct way to do it.

Have a look at twitter bootstrap 3 they have it collapse to an icon. Im sure you could modify it in media queries to change height/